open class BasePlayer : BaseInterceptable
BasePlayer implements all properties that are updated from the State and must be synchronised on ‘playerQueue’
open class BasePlayer : BaseInterceptable
BasePlayer implements all properties that are updated from the State and must be synchronised on ‘playerQueue’
Triggered when the effective URL changes, see notifyEffectiveUrlChanged(_:).
Swift
public var onEffectiveUrlChanged: ((URL) -> Void)?
The URL the content is effectively loaded with, InternalState.effectiveUrl as the state
subscriber of the player feeds it. nil until the state of the created player is delivered.
Swift
public var effectiveUrl: URL? { get set }
Reports a changed effective URL through onEffectiveUrlChanged. Called by the state
subscriber of the player on the queue of the state store; players override it to deliver
the callback on their callbacks queue.
Swift
open func notifyEffectiveUrlChanged(_ url: URL)
Apply per-state timeout values from a StateTimeoutConfiguration.
Call this whenever the player configuration is set or updated.
Swift
public func applyStateTimeoutConfiguration(_ config: StateTimeoutConfiguration?)
Cancel any pending state timeout timer.
Swift
public func cancelStateTimeoutTimer()
Schedule a timeout for state. If the player is still in state when the timer fires,
onStateTimeout(_:) is called. Cancels any previously scheduled timeout.
Swift
public func scheduleStateTimeout(for state: PlaybackState)
Called when the player has remained in state longer than the configured timeout.
Override in subclasses to dispatch the appropriate error.
Swift
open func onStateTimeout(_ state: PlaybackState)