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

    event

    An object holding specific event data.

    source

    The source instance which is associated with the emitted event

  • Called when the Source that started loading.

    Declaration

    Swift

    @objc
    optional func onSourceLoad(_ event: SourceLoadEvent, source: Source)

    Parameters

    event

    An object holding specific event data.

    source

    The source instance which is associated with the emitted event

  • Called when a Source was loaded. This does not mean that the source is immediately ready for playback.

    Declaration

    Swift

    @objc
    optional func onSourceLoaded(_ event: SourceLoadedEvent, source: Source)

    Parameters

    event

    An object holding specific event data.

    source

    The source instance which is associated with the emitted event

  • Called when the Source started unloading.

    Declaration

    Swift

    @objc
    optional func onSourceUnload(_ event: SourceUnloadEvent, source: Source)

    Parameters

    event

    An object holding specific event data.

    source

    The source instance which is associated with the emitted event

  • Called when a Source was unloaded.

    Declaration

    Swift

    @objc
    optional func onSourceUnloaded(_ event: SourceUnloadedEvent, source: Source)

    Parameters

    event

    An object holding specific event data.

    source

    The 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

    event

    An object holding specific event data.

    source

    The 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

    event

    An object holding specific event data.

    source

    The 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

    event

    An event object holding specific event data. Use event.name or event is Type to check the specific event type.

    source

    The source instance which is associated with the emitted event