mirror of
https://github.com/cranci1/Sora.git
synced 2026-04-21 08:32:00 +00:00
test
This commit is contained in:
parent
19f7a7a04c
commit
ca9deebb18
1 changed files with 6 additions and 11 deletions
|
|
@ -1299,11 +1299,10 @@ struct MediaInfoView: View {
|
||||||
videoPlayerViewController.mediaTitle = title
|
videoPlayerViewController.mediaTitle = title
|
||||||
videoPlayerViewController.subtitles = subtitles ?? ""
|
videoPlayerViewController.subtitles = subtitles ?? ""
|
||||||
videoPlayerViewController.aniListID = itemID ?? 0
|
videoPlayerViewController.aniListID = itemID ?? 0
|
||||||
videoPlayerViewController.modalPresentationStyle = .fullScreen
|
videoPlayerViewController.modalPresentationStyle = .overFullScreen
|
||||||
|
|
||||||
if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene,
|
if let currentVC = UIApplication.shared.windows.first?.rootViewController?.presentedViewController ?? UIApplication.shared.windows.first?.rootViewController {
|
||||||
let rootVC = windowScene.windows.first?.rootViewController {
|
currentVC.present(videoPlayerViewController, animated: true, completion: nil)
|
||||||
findTopViewController.findViewController(rootVC).present(videoPlayerViewController, animated: true, completion: nil)
|
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
default:
|
default:
|
||||||
|
|
@ -1339,15 +1338,11 @@ struct MediaInfoView: View {
|
||||||
episodeImageUrl: selectedEpisodeImage,
|
episodeImageUrl: selectedEpisodeImage,
|
||||||
headers: headers ?? nil
|
headers: headers ?? nil
|
||||||
)
|
)
|
||||||
customMediaPlayer.modalPresentationStyle = .fullScreen
|
customMediaPlayer.modalPresentationStyle = .overFullScreen
|
||||||
Logger.shared.log("Opening custom media player with url: \(url)")
|
Logger.shared.log("Opening custom media player with url: \(url)")
|
||||||
|
|
||||||
if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene,
|
if let currentVC = UIApplication.shared.windows.first?.rootViewController?.presentedViewController ?? UIApplication.shared.windows.first?.rootViewController {
|
||||||
let rootVC = windowScene.windows.first?.rootViewController {
|
currentVC.present(customMediaPlayer, animated: true)
|
||||||
findTopViewController.findViewController(rootVC).present(customMediaPlayer, 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"))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue