AVPlayerCollectorApi

@objc(BMAAVPlayerCollectorApi)
public protocol AVPlayerCollectorApi : Collector
  • Attach a player instance to this analytics collector.

    With calling this method the collector starts to listen to player events.

    Warning: Needs to be called before loading the source or playlist

    Declaration

    Swift

    func attach(to player: AVPlayer)

    Parameters

    player

    The AVPlayer instance which will be monitored

  • The CustomData which is applied to each sample send to the backend

    This property is an accessor of the SourceMetadata.customData

    Setting a value to this property will immediatelly change the values by

    • sending out the current sample with old CustomData and
    • overriding it with new one for upcoming samples

    Declaration

    Swift

    var customData: CustomData { get set }
  • The SourceMetadata which is send to the backend with each sample

    Notes:

    • Existing sourceMetadata will be overriden.
    • Provided CustomData through the SourceMetadata will overwrite the CustomData object set via collector.customData value by value

    Declaration

    Swift

    var sourceMetadata: SourceMetadata { get set }
  • Declaration

    Swift

    func attachPlayer(player: AVPlayer)
  • Declaration

    Swift

    func getCustomData() -> CustomData
  • Declaration

    Swift

    func setCustomData(customData: CustomData)