fetchMediaComposition
Fetches the MediaCompositionResponse located at the provided uri, along with the headers of the response it was fetched from.
val mediaCompositionResponseResult = mediaCompositionService.fetchMediaComposition(uri)
val mediaCompositionResponse = mediaCompositionResponseResult.getOrNull()
if (mediaCompositionResponse == null) {
val throwable = mediaCompositionResponseResult.exceptionOrNull()
// Handle error
} else {
// Do something with mediaCompositionResponse.mediaComposition and mediaCompositionResponse.headers
}Content copied to clipboard
Return
A Result containing either the successfully fetched MediaCompositionResponse or an error indicating the reason for failure.
Parameters
uri
The URI identifying the desired MediaComposition.