BMPPlayerListener
Objective-C
@protocol BMPPlayerListener <NSObject>
Swift
protocol PlayerListener : NSObjectProtocol
Defines listener methods for all events available for the Player
-
Called when the player is ready for immediate playback, because initial audio/video has been downloaded.
Declaration
Objective-C
- (void)onReady:(nonnull BMPReadyEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the player received an intention to start/resume playback.
Declaration
Objective-C
- (void)onPlay:(nonnull BMPPlayEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when playback has been started.
Declaration
Objective-C
- (void)onPlaying:(nonnull BMPPlayingEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the player enters the pause state.
Declaration
Objective-C
- (void)onPaused:(nonnull BMPPausedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the current playback time has changed.
Declaration
Objective-C
- (void)onTimeChanged:(nonnull BMPTimeChangedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the duration of the current played media has changed.
Declaration
Objective-C
- (void)onDurationChanged:(nonnull BMPDurationChangedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the player is about to seek to a new position. Only applies to VoD streams.
Declaration
Objective-C
- (void)onSeek:(nonnull BMPSeekEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when seeking has been finished and data is available to continue playback.
Only applies to VoD streams.
Declaration
Objective-C
- (void)onSeeked:(nonnull BMPSeekedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the player is about to time-shift to a new position. Only applies to Live streams.
Declaration
Objective-C
- (void)onTimeShift:(nonnull BMPTimeShiftEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when time shifting has been finished and data is available to continue playback. Only applies to live streams, please refer to onSeeked for VoD streams.
Declaration
Objective-C
- (void)onTimeShifted:(nonnull BMPTimeShiftedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the player is paused or in buffering state and the timeShift offset has exceeded the available timeShift window.
Declaration
Objective-C
- (void)onDvrWindowExceeded:(nonnull BMPDvrWindowExceededEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the player begins to stall and to buffer due to an empty buffer.
Declaration
Objective-C
- (void)onStallStarted:(nonnull BMPStallStartedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the player ends stalling, due to enough data in the buffer.
Declaration
Objective-C
- (void)onStallEnded:(nonnull BMPStallEndedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the current size of the video content has been changed.
Declaration
Objective-C
- (void)onVideoSizeChanged:(nonnull BMPVideoSizeChangedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the playback of the current media has finished.
Declaration
Objective-C
- (void)onPlaybackFinished:(nonnull BMPPlaybackFinishedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the first frame of the current video is rendered onto the video surface.
Declaration
Objective-C
- (void)onRenderFirstFrame:(nonnull BMPRenderFirstFrameEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when a player error is encountered.
Declaration
Objective-C
- (void)onPlayerError:(nonnull BMPPlayerErrorEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when a source error is encountered.
Declaration
Objective-C
- (void)onSourceError:(nonnull BMPSourceErrorEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when a player warning occurs.
Declaration
Objective-C
- (void)onPlayerWarning:(nonnull BMPPlayerWarningEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when a source warning occurs.
Declaration
Objective-C
- (void)onSourceWarning:(nonnull BMPSourceWarningEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when loading of a new source started. This does not mean that loading of the new manifest has been finished.
Declaration
Objective-C
- (void)onSourceLoad:(nonnull BMPSourceLoadEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when a new source is loaded. This does not mean that loading of the new manifest has been finished.
Declaration
Objective-C
- (void)onSourceLoaded:(nonnull BMPSourceLoadedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the current source will be unloaded.
Declaration
Objective-C
- (void)onSourceUnload:(nonnull BMPSourceUnloadEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the current source has been unloaded.
Declaration
Objective-C
- (void)onSourceUnloaded:(nonnull BMPSourceUnloadedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the player was destroyed.
Declaration
Objective-C
- (void)onDestroy:(nonnull BMPDestroyEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when metadata (i.e. ID3 tags in HLS and EMSG in DASH) are encountered.
Declaration
Objective-C
- (void)onMetadata:(nonnull BMPMetadataEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when metadata is parsed.
Declaration
Objective-C
- (void)onMetadataParsed:(nonnull BMPMetadataParsedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when casting to another device, such as a ChromeCast, is available.
Declaration
Objective-C
- (void)onCastAvailable:(nonnull BMPCastAvailableEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the playback on a cast device has been paused.
Declaration
Objective-C
- (void)onCastPaused:(nonnull BMPCastPausedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the playback on a cast device has been finished.
Declaration
Objective-C
- (void)onCastPlaybackFinished:(nonnull BMPCastPlaybackFinishedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when playback on a cast device has been started.
Declaration
Objective-C
- (void)onCastPlaying:(nonnull BMPCastPlayingEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the cast app is launched successfully.
Declaration
Objective-C
- (void)onCastStarted:(nonnull BMPCastStartedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when casting is initiated, but the user still needs to choose which device should be used.
Declaration
Objective-C
- (void)onCastStart:(nonnull BMPCastStartEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when casting to a device is stopped.
Declaration
Objective-C
- (void)onCastStopped:(nonnull BMPCastStoppedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the time update from the currently used cast device is received.
Declaration
Objective-C
- (void)onCastTimeUpdated:(nonnull BMPCastTimeUpdatedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when a cast device has been chosen and player is waiting for the device to get ready for playback.
Declaration
Objective-C
- (void)onCastWaitingForDevice:(nonnull BMPCastWaitingForDeviceEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when a sideloaded subtitle cue has been parsed.
Declaration
Objective-C
- (void)onCueParsed:(nonnull BMPCueParsedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when a subtitle entry transitions into the active status.
Declaration
Objective-C
- (void)onCueEnter:(nonnull BMPCueEnterEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when an active subtitle entry transitions into the inactive status.
Declaration
Objective-C
- (void)onCueExit:(nonnull BMPCueExitEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when a new BMPSubtitleTrack is added, for example using the BMPPlayer#addSubtitle: call.
Declaration
Objective-C
- (void)onSubtitleAdded:(nonnull BMPSubtitleAddedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when an external BMPSubtitleTrack has been removed so it is possible to update the controls accordingly.
Declaration
Objective-C
- (void)onSubtitleRemoved:(nonnull BMPSubtitleRemovedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the active BMPSubtitleTrack is changed.
Declaration
Objective-C
- (void)onSubtitleChanged:(nonnull BMPSubtitleChangedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the player is muted.
Declaration
Objective-C
- (void)onMuted:(nonnull BMPMutedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the player is unmuted.
Declaration
Objective-C
- (void)onUnmuted:(nonnull BMPUnmutedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when an audio track is added.
Declaration
Objective-C
- (void)onAudioAdded:(nonnull BMPAudioAddedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when an audio track is removed.
Declaration
Objective-C
- (void)onAudioRemoved:(nonnull BMPAudioRemovedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the audio track is changed.
Declaration
Objective-C
- (void)onAudioChanged:(nonnull BMPAudioChangedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the playback of an ad has been started.
Declaration
Objective-C
- (void)onAdStarted:(nonnull BMPAdStartedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the playback of an ad has been finished.
Declaration
Objective-C
- (void)onAdFinished:(nonnull BMPAdFinishedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the playback of an ad has progressed over a quartile boundary.
Declaration
Objective-C
- (void)onAdQuartile:(nonnull BMPAdQuartileEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the playback of an ad break has been started.
Declaration
Objective-C
- (void)onAdBreakStarted:(nonnull BMPAdBreakStartedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the playback of an ad break has been finished.
Declaration
Objective-C
- (void)onAdBreakFinished:(nonnull BMPAdBreakFinishedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when an ad manifest was successfully downloaded and parsed and the ad has been added onto the queue.
Declaration
Objective-C
- (void)onAdScheduled:(nonnull BMPAdScheduledEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when an ad has been skipped.
Declaration
Objective-C
- (void)onAdSkipped:(nonnull BMPAdSkippedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the user clicks on the ad.
Declaration
Objective-C
- (void)onAdClicked:(nonnull BMPAdClickedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when ad playback fails.
Declaration
Objective-C
- (void)onAdError:(nonnull BMPAdErrorEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the download of an ad manifest is starting.
Declaration
Objective-C
- (void)onAdManifestLoad:(nonnull BMPAdManifestLoadEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the ad manifest has been successfully loaded.
Declaration
Objective-C
- (void)onAdManifestLoaded:(nonnull BMPAdManifestLoadedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the current video download quality has changed.
Declaration
Objective-C
- (void)onVideoDownloadQualityChanged: (nonnull BMPVideoDownloadQualityChangedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when a web download request has finished.
Declaration
Objective-C
- (void)onDownloadFinished:(nonnull BMPDownloadFinishedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when AirPlay playback starts or stops.
Declaration
Objective-C
- (void)onAirPlayChanged:(nonnull BMPAirPlayChangedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when AirPlay is available.
Declaration
Objective-C
- (void)onAirPlayAvailable:(nonnull BMPAirPlayAvailableEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when a source config is loaded which has metadata attached or when setSourceMetadata: is called on the player.
Declaration
Objective-C
- (void)onSourceMetadataChanged:(nonnull BMPSourceMetadataChangedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when DRM data is found in a downloaded manifest file. TweaksConfig.nativeHlsParsingEnabled needs to be set to
trueto receive those events.Declaration
Objective-C
- (void)onDrmDataParsed:(nonnull BMPDrmDataParsedEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when a source was loaded into the Player.
Declaration
Objective-C
- (void)onPlayerActive:(nonnull BMPPlayerActiveEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the
Playerwas unloaded.Declaration
Objective-C
- (void)onPlayerInactive:(nonnull BMPPlayerInactiveEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called when the player transitions between two sources in a playlist.
Declaration
Objective-C
- (void)onPlaylistTransition:(nonnull BMPPlaylistTransitionEvent *)event player:(nonnull id<BMPPlayer>)player;Parameters
eventAn object holding specific event data.
playerThe player instance which is associated with the emitted event
-
Called for each occurring player event.
Declaration
Parameters
eventThe player event. Use
event.nameor [event isKindOfClass:] to check the specific event type.playerThe player instance which is associated with the emitted event
BMPPlayerListener Protocol Reference