mirror of
https://github.com/cranci1/Sora.git
synced 2026-04-12 20:40:21 +00:00
bro i hate ts 😭
This commit is contained in:
parent
d0a622c2b7
commit
cf4af358f5
1 changed files with 6 additions and 2 deletions
|
|
@ -1292,12 +1292,16 @@ struct MediaInfoView: View {
|
|||
videoPlayerViewController.mediaTitle = title
|
||||
videoPlayerViewController.subtitles = subtitles ?? ""
|
||||
videoPlayerViewController.aniListID = itemID ?? 0
|
||||
videoPlayerViewController.modalPresentationStyle = .overFullScreen
|
||||
videoPlayerViewController.modalPresentationStyle = .fullScreen
|
||||
|
||||
if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene,
|
||||
let rootVC = windowScene.windows.first?.rootViewController {
|
||||
findTopViewController.findViewController(rootVC).present(videoPlayerViewController, animated: true, completion: nil)
|
||||
} else {
|
||||
Logger.shared.log("Failed to find root view controller", type: "Error")
|
||||
DropManager.shared.showDrop(title: "Error", subtitle: "Failed to present player", duration: 2.0, icon: UIImage(systemName: "xmark.circle"))
|
||||
}
|
||||
|
||||
return
|
||||
default:
|
||||
break
|
||||
|
|
@ -1332,7 +1336,7 @@ struct MediaInfoView: View {
|
|||
episodeImageUrl: selectedEpisodeImage,
|
||||
headers: headers ?? nil
|
||||
)
|
||||
customMediaPlayer.modalPresentationStyle = .overFullScreen
|
||||
customMediaPlayer.modalPresentationStyle = .fullScreen
|
||||
Logger.shared.log("Opening custom media player with url: \(url)")
|
||||
|
||||
if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene,
|
||||
|
|
|
|||
Loading…
Reference in a new issue