mirror of
https://github.com/dirtydishes/dreamio.git
synced 2026-06-07 13:58:15 +00:00
add native debrid stream playback
This commit is contained in:
parent
3df2e2b833
commit
d28540ce98
12 changed files with 936 additions and 62 deletions
22
Dreamio/NativePlaybackBackend.swift
Normal file
22
Dreamio/NativePlaybackBackend.swift
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import UIKit
|
||||
|
||||
protocol NativePlaybackBackend: AnyObject {
|
||||
var view: UIView { get }
|
||||
var onReady: (() -> Void)? { get set }
|
||||
var onFailure: ((Error) -> Void)? { get set }
|
||||
|
||||
func prepare(in viewController: UIViewController)
|
||||
func play(request: NativePlaybackRequest)
|
||||
func stop()
|
||||
}
|
||||
|
||||
enum NativePlaybackError: LocalizedError {
|
||||
case backendUnavailable
|
||||
|
||||
var errorDescription: String? {
|
||||
switch self {
|
||||
case .backendUnavailable:
|
||||
return "Native playback is not available in this build."
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue