SRGMediaItem

fun SRGMediaItem(urn: String, block: SRGMediaItemBuilder.() -> Unit = {}): MediaItem

Creates a MediaItem suited for SRG SSR content identified by a URN.

Basic usage

val mediaItem: MediaItem = SRGMediaItem("urn:rts:audio:3262363")

Custom configuration

val mediaItem: MediaItem = SRGMediaItem("urn:rts:audio:3262363") {
host(IlHost.PROD)
vector(Vector.TV)
}

Modify an existing MediaItem

val updatedMediaItem: MediaItem = mediaItem.buildUpon {
urn("urn:rts:video:1234")
}

Return

A MediaItem configured for the specified SRG SSR content.

Parameters

urn

The URN identifying the SRG SSR content.

block

An optional lambda to further configure the MediaItem.