Published on December 6, 2023 (6 months ago)

The native mobile players you already use, with a sprinkle of Mux

Dylan Jhaveri
By Dylan Jhaveri4 min readProduct

Updated 5/20/24: Mux Player for iOS and Android is now GA, learn about it here.


Mux Player for web has been nothing short of a resounding success. It may seem weird that a video infrastructure company waited 5 years before building a player — it’s usually the first thing video companies build.

We did things backward: first, we developed Mux Data (analytics for video), then Mux Video (video hosting and delivery), and then Mux Player for web (a client-side player SDK that ties Data and Video together). This order of operations was intentional and strategic, but that’s a post for another day.

We’ve now expanded our player offering beyond the web to include SDKs for both iOS and Android, available today in beta. Without burying the lede here, let me show you how to use them:

iOS with AVPlayerViewController

swift
let playerViewController = AVPlayerViewController(playbackID: {PLAYBACK_ID})

iOS with AVPlayerLayer

swift
let playerLayer = AVPlayerLayer(playbackID: {PLAYBACK_ID})

Android with ExoPlayer/Media3

kotlin
val mediaItem = MediaItems.builderFromMuxPlaybackId({PLAYBACK_ID})

During this beta period, we would love for the broader Mux public to use this player and provide some feedback. Please let us know if you’re using these SDKs by dropping us a note anytime at player@mux.com. Messages sent to this email go directly to my inbox, and I reply to every message.

LinkJust the player, no gimmicks

We’ve taken a straightforward approach to bring you Mux Player for iOS and Android — an easy-to-implement player that can be used whether or not you’ve used native mobile players in the past. There are a few things this approach is not (these make me so happy):

  • It’s NOT another player API for you to learn
  • It’s NOT a fancy player wrapper that obscures what is happening under the hood
  • It’s NOT a meaningless abstraction

If you’ve built video playback on iOS, you are already familiar with AVPlayer. If you’re building with AVPlayer for the first time, there are tons of resources out there about how you can manipulate it for your use case. Ditto for Android with ExoPlayer and Media3. We didn’t reinvent the wheel here and give you a meaningless layer of abstraction. With our approach, you get back an instance of the platform object, not a wrapper that obfuscates the underlying functionality. And we think developers will like that.

LinkSo what does this player do for you?

If this player is as simple as we say it is, what can it do for you? Right now, it automatically configures the basics of Mux Data without requiring extra steps from you. If you’re using the platform players that do not have the Mux SDKs installed, you can set up Mux Data yourself for iOS or Android, but in the Mux Player, we took care of that step for you.

All of the Mux Video features you know and love are supported in the player SDKs, including signed URLs and manifest manipulation parameters.

LinkLet’s dream a little: what else can this player do?

Well, this is where it starts to get interesting. We’re releasing the player in beta for Mux Video developers as a simple and straightforward playback SDK, but we’d like to build in more functionality to solve some of the hard mobile playback issues that people tend to run into.

It turns out that even though AVPlayer and ExoPlayer are mature and time-tested, they don’t make it easy to do everything you want to do. For example, if you're trying to build a TikTok-like experience, it's actually quite difficult to do that today with the native platform APIs. We're thinking about how we can expose more APIs in the player SDKs around caching and preloading to make that sort of thing easier.

The challenge with building any video app at scale is balancing user experience, complexity, and cost — but we think we can build some things into these players that give you tools that decrease the complexity while helping you can make informed decisions about how you want to control your delivery costs and build the best experience possible for your users.

Are you building a mobile app with Mux and implementing a player? Please reach out, particularly if you have a thorny playback problem you’re trying to solve. We’d love to hear from you!

Please visit the guides for iOS and Android to get started.

Written By

Dylan Jhaveri

Software Engineer and cold water surfer. Previously startup co-founder. Trying to find the best cheeseburger in San Francisco.

Leave your wallet where it is

No credit card required to get started.