public protocol CastAPI
API for casting (Chromecast, AirPlay).
public protocol CastAPI
API for casting (Chromecast, AirPlay).
Analytics metadata.
Swift
var metadata: AnalyticsMetadata? { get set }
Generic track list.
Swift
var tracks: [Track] { get }
Video track list.
Swift
var videoTracks: [VideoTrack] { get }
Audio track list.
Swift
var audioTracks: [AudioTrack] { get }
Text track list.
Swift
var textTracks: [TextTrack] { get }
Returns true
if casting is active.
Swift
var isCasting: Bool { get }
Returns true
if is currently connected to a session.
Swift
var hasConnectedSession: Bool { get }
Button to activate casting.
Swift
var button: UIButton? { get }
ViewController with Chromecast mini media controls
Swift
var miniMediaControlsViewController: UIViewController? { get }
ViewController with Chromecast expanded media controls
Swift
var expandedMediaControlsViewController: UIViewController? { get }
Override authToken passed to
Swift
var authToken: String? { get set }
Returns true
If we start playback automatically after conten is loaded.
Swift
var autoplay: Bool? { get set }
Initial playback position.
Swift
var position: Double? { get set }
Stream duration.
Swift
var duration: Double { get }
Custom subtitle style.
Swift
var subtitlesStyle: SubtitlesStyle? { get set }
Media status
Swift
var onMediaUpdate: ((CastMediaStatus) -> Void)? { get set }
Report current cast state.
Swift
var onCastState: ((CastState) -> Void)? { get set }
Load configuration.
Swift
func load(_ playerConfiguration: PlayerConfiguration)
Present expanded media controls ViewController
Swift
func presentExpandedMediaControls()
Connects and controls existing cast session.
Swift
func join()
Start playback.
Swift
func play()
Pause playback.
Swift
func pause()
Stop playback.
Swift
func stop()
Ends the current cast session.
Swift
func endSession(_ stopCasting: Bool) -> Bool
stopCasting
|
If |
true
if the operation to end the session started successfully. false
if
there is no session currently established or if the operation could not be started.
Seek to a given time.
Swift
func seek(_ time: CMTime)
time
|
Time to seek. |