SourceListener
@objc(BMPSourceListener)
public protocol SourceListener : NSObjectProtocol
Includes all possible methods that an implementation of this protocol can implement. The corresponding method will be called when an event is emitted (if implemented).
-
Called when the source duration has changed. Not emitted for the initial duration.
Declaration
Swift
@objc optional func onDurationChanged(_ event: DurationChangedEvent, source: Source)Parameters
eventAn object holding specific event data.
sourceThe source instance which is associated with the emitted event
-
Called when the
Sourcethat started loading.Declaration
Swift
@objc optional func onSourceLoad(_ event: SourceLoadEvent, source: Source)Parameters
eventAn object holding specific event data.
sourceThe source instance which is associated with the emitted event
-
Called when a
Sourcewas loaded. This does not mean that the source is immediately ready for playback.Declaration
Swift
@objc optional func onSourceLoaded(_ event: SourceLoadedEvent, source: Source)Parameters
eventAn object holding specific event data.
sourceThe source instance which is associated with the emitted event
-
Called when the
Sourcestarted unloading.Declaration
Swift
@objc optional func onSourceUnload(_ event: SourceUnloadEvent, source: Source)Parameters
eventAn object holding specific event data.
sourceThe source instance which is associated with the emitted event
-
Called when a
Sourcewas unloaded.Declaration
Swift
@objc optional func onSourceUnloaded(_ event: SourceUnloadedEvent, source: Source)Parameters
eventAn object holding specific event data.
sourceThe source instance which is associated with the emitted event
-
Called when a source warning occurred.
Declaration
Swift
@objc optional func onSourceWarning(_ event: SourceWarningEvent, source: Source)Parameters
eventAn object holding specific event data.
sourceThe source instance which is associated with the emitted event
-
Called when a source error occurred.
Declaration
Swift
@objc optional func onSourceError(_ event: SourceErrorEvent, source: Source)Parameters
eventAn object holding specific event data.
sourceThe source instance which is associated with the emitted event
-
Called when metadata is parsed.
Declaration
Swift
@objc optional func onMetadataParsed(_ event: MetadataParsedEvent, source: Source)Parameters
eventAn object holding specific event data.
sourceThe source instance which is associated with the emitted event
-
Called for each occurring player event.
Declaration
Swift
@objc optional func onEvent(_ event: SourceEvent, source: Source)Parameters
eventAn event object holding specific event data. Use
event.nameorevent is Typeto check the specific event type.sourceThe source instance which is associated with the emitted event
-
Called when the drm data was parsed for the specific source.
Declaration
Swift
@objc optional func onDrmDataParsed(_ event: DrmDataParsedEvent, source: Source)Parameters
eventAn object holding specific event data.
sourceThe source instance which is associated with the emitted event
-
Called when an audio track is added.
Declaration
Swift
@objc optional func onAudioAdded(_ event: AudioAddedEvent, source: Source)Parameters
eventAn object holding specific event data.
sourceThe source instance which is associated with the emitted event
-
Called when an audio track is removed.
Declaration
Swift
@objc optional func onAudioRemoved(_ event: AudioRemovedEvent, source: Source)Parameters
eventAn object holding specific event data.
sourceThe source instance which is associated with the emitted event
-
Called when the audio track is changed.
Declaration
Swift
@objc optional func onAudioChanged(_ event: AudioChangedEvent, source: Source)Parameters
eventAn object holding specific event data.
sourceThe source instance which is associated with the emitted event
SourceListener Protocol Reference