fetchMediaComposition

open suspend override fun fetchMediaComposition(uri: Uri): Result<MediaComposition>

Fetches a MediaComposition located at the provided uri.

val mediaCompositionResult = mediaCompositionService.fetchMediaComposition(uri)
val mediaComposition = mediaCompositionResult.getOrNull()
if (mediaComposition == null) {
val throwable = mediaCompositionResult.exceptionOrNull()
// Handle error
} else {
// Do something with the media composition
}

Return

A Result containing either the successfully fetched MediaComposition or an error indicating the reason for failure.

Parameters

uri

The URI identifying the desired MediaComposition.