mirror of
https://github.com/dirtydishes/dreamio.git
synced 2026-06-06 13:37:24 +00:00
fix native playback cocoa pods build
This commit is contained in:
parent
6e220e6df9
commit
511224bcd4
9 changed files with 386 additions and 5 deletions
|
|
@ -368,6 +368,12 @@ final class DreamioWebViewController: UIViewController {
|
|||
|
||||
@MainActor
|
||||
private func resolveAndPresentNativePlayback(_ request: NativePlaybackRequest) async {
|
||||
guard VLCNativePlaybackBackend.isAvailable else {
|
||||
lastNativePlaybackURL = nil
|
||||
showNativePlaybackUnavailableAlert()
|
||||
return
|
||||
}
|
||||
|
||||
do {
|
||||
let resolved = try await streamResolver.resolve(request: request)
|
||||
#if DEBUG
|
||||
|
|
@ -407,6 +413,16 @@ final class DreamioWebViewController: UIViewController {
|
|||
present(alert, animated: true)
|
||||
}
|
||||
|
||||
private func showNativePlaybackUnavailableAlert() {
|
||||
let alert = UIAlertController(
|
||||
title: "Native playback needs CocoaPods",
|
||||
message: "This build was opened from Dreamio.xcodeproj or built before MobileVLCKit was installed. Run pod install, open Dreamio.xcworkspace, then build again to play MKV, AVI, and WebM streams.",
|
||||
preferredStyle: .alert
|
||||
)
|
||||
alert.addAction(UIAlertAction(title: "Close", style: .cancel))
|
||||
present(alert, animated: true)
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
private func logDiagnostic(type: String, payload: Any, pageURL: String?) {
|
||||
let redactedPageURL = pageURL.map(redactedURLString) ?? "unknown"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue