BitmovinPlayerCollectorApi
@objc(BMABitmovinPlayerCollectorApi)
public protocol BitmovinPlayerCollectorApi : 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: Player)Parameters
playerThe
Playerinstance which will be monitored -
Applies the given
SourceMetadatato the givenSourcefor future usage.When the given source is active and played back, the
SourceMetadataprovided will be sent with each sampleUse this for playlist setups in order to automatically change
SourceMetadataon source transitionNotes:
- Existing
sourceMetadatawill be overriden. Provided
CustomDatathrough theSourceMetadatawill overwrite theCustomDataobject set viacollector.customDatavalue by value
Declaration
Swift
func apply(sourceMetadata: SourceMetadata, for source: Source)Parameters
sourceMetadataThe
SourceMetadatawhich will be usedsourceThe
Sourcefor which theSourceMetadatawill be used - Existing
-
Returns the current
SourceMetadatafor the givenSource.Notes:
Declaration
Swift
func sourceMetadata(for source: Source) -> SourceMetadataParameters
sourceThe
Sourcefor which theSourceMetadatawill be returned -
Applies the given
CustomDatato the givenSourcefor future usage.When the provided
Sourceis currently active, this method 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
func apply(customData: CustomData, for source: Source)Parameters
customDataThe
CustomDatawhich will be usedsourceThe
Sourcefor which theCustomDatawill be used -
Returns the
CustomDatafor the given `SourceDeclaration
Swift
func customData(for source: Source) -> CustomDataParameters
sourceThe
Sourcefor which theCustomDatawill be returned -
Declaration
Swift
func addSourceMetadata(playerSource: Source, sourceMetadata: SourceMetadata) -
Declaration
Swift
func attachPlayer(player: Player)
BitmovinPlayerCollectorApi Protocol Reference