Dash

object Dash

Opens DASH presentations: fetches a manifest, and builds a playable item from it.

Functions

Link copied to clipboard
suspend fun manifest(mpdUrl: String, client: HttpClient, policy: DashUrlPolicy = DashUrlPolicy.Default, maxManifestBytes: Long = MAX_MANIFEST_BYTES, readerPolicy: HttpReaderPolicy = HttpReaderPolicy()): DashManifest

Fetches and parses mpdUrl. Confined to Dispatchers.Default for the same reason DashMediaIo confines its fetches: on Kotlin/Native the Darwin engine resumes onto the main queue, which a plain runBlocking main thread never serves, and the fetch deadlocks.

Link copied to clipboard
suspend fun mediaItemFor(mpdUrl: String, client: HttpClient, policy: DashUrlPolicy = DashUrlPolicy.Default, maxManifestBytes: Long = MAX_MANIFEST_BYTES, maxSegmentBytes: Long = MAX_SEGMENT_BYTES, readerPolicy: HttpReaderPolicy = HttpReaderPolicy()): MediaItem

A playable MediaItem for mpdUrl, over client. The item's uri stays the manifest's, for labels. readerPolicy limits the manifest fetch and every later fetch, as in manifest.