fromMuxPlaybackId

fun fromMuxPlaybackId(playbackId: String, maxResolution: PlaybackResolution? = null, minResolution: PlaybackResolution? = null, renditionOrder: RenditionOrder? = null, domain: String? = MUX_VIDEO_DEFAULT_DOMAIN, playbackToken: String? = null, drmToken: String? = null): MediaItem

Creates a new MediaItem that points to a given Mux Playback ID.

Controlling resolution

You can use the maxResolution and minResolution parameters to control the possible video resolutions that Mux Player can stream. You can use these parameters to control your overall playback experience and platform usage. Lower resolution generally means smoother playback experience and lower costs, higher resolution generally means nicer-looking videos that may take longer to start or stall on unfavorable networks.

Custom domains

If you are using Mux Video custom domains, you can configure your MediaItem with your custom domain using the domain parameter

DRM and Secure playback

Mux player provides two types of playback security, signed playback and DRM playback. Signed playback protects your assets from being played by third parties by using a Playback Token you generate securely on your application backend. DRM playbacks adds additional system-level protections against unauthorized copying and recording of your media, but requires additional setup.

Secure Playback

To use secure playback, you must provide a valid playbackToken

DRM Playback

To use DRM playback, you must provide both a valid playbackToken and a valid drmToken

DRM is currently in beta. If you are interested in participating, or have questions, please email support@mux.com

Parameters

playbackId

A playback ID for a Mux Asset

maxResolution

The maximum resolution that should be requested over the network

minResolution

The minimum resolution that should be requested over the network

renditionOrder

RenditionOrder.Descending to emphasize quality, RenditionOrder.Ascending to emphasize performance

domain

Optional custom domain for Mux Video. The default is MUX_VIDEO_DEFAULT_DOMAIN

playbackToken

Playback token for secure playback

drmToken

DRM Token required for DRM Playback. For DRM, you also need a playbackToken

See also