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
player
The
Player
instance which will be monitored -
Applies the given
SourceMetadata
to the givenSource
for future usage.When the given source is active and played back, the
SourceMetadata
provided will be sent with each sampleUse this for playlist setups in order to automatically change
SourceMetadata
on source transitionNotes:
- Existing
sourceMetadata
will be overriden. Provided
CustomData
through theSourceMetadata
will overwrite theCustomData
object set viacollector.customData
value by value
Declaration
Swift
func apply(sourceMetadata: SourceMetadata, for source: Source)
Parameters
sourceMetadata
The
SourceMetadata
which will be usedsource
The
Source
for which theSourceMetadata
will be used - Existing
-
Returns the current
SourceMetadata
for the givenSource
.Notes:
Declaration
Swift
func sourceMetadata(for source: Source) -> SourceMetadata
Parameters
source
The
Source
for which theSourceMetadata
will be returned -
Applies the given
CustomData
to the givenSource
for future usage.When the provided
Source
is 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
customData
The
CustomData
which will be usedsource
The
Source
for which theCustomData
will be used -
Returns the
CustomData
for the givenSource
Declaration
Swift
func customData(for source: Source) -> CustomData
Parameters
source
The
Source
for which theCustomData
will be returned -
Declaration
Swift
func addSourceMetadata(playerSource: Source, sourceMetadata: SourceMetadata)
-
Declaration
Swift
func attachPlayer(player: Player)