DorisPlayerEvent
public enum DorisPlayerEvent
Available events tant can be sent by DorisPlayerOutputProtocol.onPlayerEvent(...)
-
indicates current player item changed
Declaration
Swift
case didCurrentItemChange(old: AVPlayerItem?, new: AVPlayerItem?)
-
indicates current player item failed
Declaration
Swift
case playerItemFailed(logs: [String : Any]?, error: DorisPlayerError?)
-
indicates playback stalled
Declaration
Swift
case playbackStalled
-
raw AVPlayer.TimeControlStatus state changed event, do not rely on it in terms of player state (playing/paused), rely on
DorisPlayerOutputProtocol.onPlayerStateChanged()
delegate method insteadDeclaration
Swift
case didTimeControlStatusChange(status: AVPlayer.TimeControlStatus)
-
stream is going to be loaded with delay
Declaration
Swift
case willLoadAfterDelay(delay: Double, initialSeek: DorisSeekType?)
-
stream is going to be loaded now
Declaration
Swift
case willLoadNow(delay: Double?, initialSeek: DorisSeekType?)
-
AVPlayer will perform seek
Declaration
Swift
case willSeek(info: AVPlayer.SeekStartedInfo)
-
AVPlayer did perform seek
Declaration
Swift
case didSeek(info: AVPlayer.SeekEndedInfo)
-
stream ended
Declaration
Swift
case finishedPlaying(endTime: Double)
-
stream current progress time has changed, where time is playback position in seconds, date will be nil for vods, and will represent current progress as Date for Lives if possible
Declaration
Swift
case currentTimeChanged(contentPosition: Double, streamPosition: Double, date: Date?)
-
stream duration has changed
Declaration
Swift
case itemDurationChanged(contentDuration: Double, streamDuration: Double)
-
stream type recognized
Declaration
Swift
case streamTypeRecognized(streamType: StreamType)
-
DVR window (seekabke range) has changed
Declaration
Swift
case seekableTimeRangesChanged(contentSeekableRanges: (start: Double, end: Double), streamSeekableRanges: (start: Double, end: Double))
-
Buffered range
Declaration
Swift
case loadedTimeRangesChanged(contentLoadedRanges: (start: Double, end: Double), streamLoadedRanges: (start: Double, end: Double))
-
available subtitles and audiotracks
Declaration
Swift
case availableMediaSelectionLoaded(subtitles: [DorisMediaSelection], audioTracks: [DorisMediaSelection])
-
audiosession routes changing event (airplay, headphones, builtInSpeaker, etc..)
Declaration
Swift
case audioSessionRouteChanged(route: DorisAudioSessionRoute)
-
dictionary representation of AVPlayerItemAccessLog, updates every second
Declaration
Swift
case playbackLogsUpdated(logs: [String : Any])
-
indicates that AVPlayerItem status changes to readyToPlay and initial seek was completed if provided
Declaration
Swift
case readyToPlay
-
indicates that player will transition to picture in picture (Custom UI only)
Declaration
Swift
case pipWillStart
-
indicates that player will transition back to app from picture in picture (Custom UI only)
Declaration
Swift
case pipDidStop
-
indicates that player item current selected subtitle was changed
Declaration
Swift
case subtitleChanged(subtitle: DorisMediaSelection, autoSet: Bool)
-
indicates that player item current selected audioTrack was changed
Declaration
Swift
case audioTrackChanged(audioTrack: DorisMediaSelection, autoSet: Bool)
-
video presentation size changed
Declaration
Swift
case presentationSizeChanged(size: CGSize)
-
playback Quality Changed changed isBandwidthLimited will be true for
low
(andauto
if low data mode is enabled)Declaration
Swift
case playbackQualityChanged(quality: DorisPlaybackQuality, isBandwidthLimited: Bool)