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
playerThe
AVPlayerinstance which will be monitored -
The
CustomDatawhich is applied to each sample send to the backendThis property is an accessor of the
SourceMetadata.customDataSetting a value to this property will immediatelly change the values by
- sending out the current sample with old
CustomDataand - overriding it with new one for upcoming samples
Declaration
Swift
var customData: CustomData { get set } - sending out the current sample with old
-
The
SourceMetadatawhich is send to the backend with each sampleNotes:
- Existing
sourceMetadatawill be overriden. - Provided
CustomDatathrough theSourceMetadatawill overwrite theCustomDataobject set viacollector.customDatavalue by value
Declaration
Swift
var sourceMetadata: SourceMetadata { get set } - Existing
-
Declaration
Swift
func attachPlayer(player: AVPlayer) -
Declaration
Swift
func getCustomData() -> CustomData -
Declaration
Swift
func setCustomData(customData: CustomData)
AVPlayerCollectorApi Protocol Reference