mediaMetaData
fun mediaMetaData(block: suspend MediaMetadata.Builder.(MediaMetadata, Chapter, MediaComposition) -> Unit)
Configures the MediaMetadata that is created for the loaded asset.
The provided block will be executed when creating the asset's metadata, giving you access to:
MediaMetadata
: the MediaMetadata instance.Chapter
: the current Chapter.MediaComposition
: the current MediaComposition.
Example
val srgAssetLoader = SRGAssetLoader(context) {
mediaMetaData { mediaMetadata, chapter, mediaComposition ->
setTitle(chapter.title)
}
}
Content copied to clipboard
Parameters
block
The configuration block to execute.