asNativeMediaItemBuilder
Creates a builder object for a platform-specific MediaItem compatible with the underlying media player, pre-populated with data from the current AstroMediaItem.
This function takes an optional metadata argument (defaulting to the metadata property of the current AstroMediaItem after conversion using asNativeMediaMetadata() if available). It creates a new MediaItem.Builder object and applies the following configuration:
If
metadatais provided, it sets the media metadata usingsetMediaMetadata(metadata).It sets the media ID using
setMediaId(mediaId).It sets the media source URI by converting the
sourceproperty of theAstroMediaItemto an Android URI usingtoAndroidUri().
The resulting builder object allows further customization of the MediaItem before building the final object using build().
Return
A MediaItem.Builder object pre-populated with data from the current AstroMediaItem.
Parameters
An optional MediaMetadata object representing the media metadata in a format compatible with the underlying media player (defaults to the converted metadata from the current AstroMediaItem).