@objc
public enum PlaybackState : Int, Equatable, CustomStringConvertible
Playback state.
@objc
public enum PlaybackState : Int, Equatable, CustomStringConvertible
Playback state.
The player is in idle
state when no content is loaded or being loaded and no additional
resources are open. No data is loaded in buffers and no decoder instances are open.
This is the initial state of the Player.
Swift
case idle
The player is in opening
state when it started to open content. It will stay in this state
until it has enough meta-data loaded to build up a track model and transition to Ready.
Swift
case opening
The player reaches the ready
state when enough data was loaded to build a track model.
At this point how the player proceeds depends on the autoplay
configuration.
Swift
case ready
The player does not have enough data to keep in playing and need to fill its buffers further before playback can continue.
Swift
case buffering
The player tries to start playback. This operation might fail, for instance because if auto-play not being permitted, in which case the player transitions to Pausing. Usually the player transitions out to Playing and playback starts.
Swift
case play
The playhead is moving forward and the content is playing.
Swift
case playing
The player is trying to pause playback.
Swift
case pausing
Playback is possible but currently paused.
Swift
case paused
The player is trying to stop playback.
Swift
case stopping
A position change was requested. The player can either reach the new position in its buffer
and will transition back to playing
or pausing
depending on where it came from or it
will first transition into buffering
if the requested position is not found in the current
buffer.
Swift
case seeking
The final state of the player is reached when the playhead moves to the end of the available
content either by normal playback or via a seek operation that seeks at or beyond the end of
the content. The player will stay in the ended
state until it is released or the user
seeks back into the content timeline. In addition to releasing, the player can also
transition to opening
here.
Swift
case ended
The player ends up in the error
state after a fatal error occurred. The player can not get
out of the error
state itself and needs to be released.
Swift
case error
Swift
public var description: String { get }