trackerData
Configures a block to inject custom data into the MutableMediaItemTrackerData used for tracking media playback.
The provided block will be executed when creating the tracker data, giving you access to:
this
: the MutableMediaItemTrackerData instance being configured.Resource
: the Resource being tracked.Chapter
: the Chapter being tracked.MediaComposition
: the current MediaComposition.
Example
val srgAssetLoader = SRGAssetLoader(context) {
trackerData { resource, chapter, mediaComposition ->
this["event-logger"] = FactoryData(SRGEventLoggerTracker.Factory(), Unit)
}
}
Content copied to clipboard
Parameters
block
The configuration block to execute.