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:

Example

val srgAssetLoader = SRGAssetLoader(context) {
trackerData { resource, chapter, mediaComposition ->
this["event-logger"] = FactoryData(SRGEventLoggerTracker.Factory(), Unit)
}
}

Parameters

block

The configuration block to execute.