Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.
CristianDRM edited this page Oct 19, 2017 · 20 revisions

Events

You can find public events on Events enum.

Name Description
bufferUpdate Media buffer percentage updated.
positionUpdate Media position updated.
ready Player is ready for playback.
stalled Changed to STALLED state.
willUpdateAudioSource Will change audio source.
didUpdateAudioSource Audio source was changed.
willUpdateSubtitleSource Will change subtitle source.
didUpdateSubtitleSource Subtitle source was changed.
disableMediaControl Media control exhibition was disabled.
enableMediaControl Media control exhibition was enabled.
didComplete Media playback was completed.
willPlay Will change to PLAYING state.
playing Did change to PLAYING state.
willPause Will change to PAUSE state.
didPause Did change to PAUSE state.
willStop Will change to STOP state.
didStop Did change to STOP state.
airPlayStatusUpdate Did update Air Play external playback.
requestFullscreen Player is requesting to enter fullscreen.
exitFullscreen Player is requesting to exit fullscreen.
requestPosterUpdate Request to update poster.
willUpdatePoster Will update poster image.
didUpdatePoster Did update poster image.
error Player or media error detected. userInfo can contain the error that caused the event.

How to use

Below there is an example that shows how to listen the player events

player.on(Event.playing) { userInfo in
    print("on Play")
}
Clone this wiki locally