The state of Media Source Extensions in Firefox

Martin Brinkmann
Oct 26, 2014
Updated • Nov 21, 2014
Firefox
|
10

Media Source Extensions (MSE) is a specification that enables JavaScript to generate media streams for playback. The most prominent website that requires Media Source Extensions for some functionality is YouTube.

If you use the site's HTML5 player without Media Source Extensions, only some video resolutions are made available. In particular, 720p is the highest quality that is available in this case even if the video itself is also available in 1080p or even 4k.

Note: This is not the case if Adobe Flash is used to play videos on YouTube.

Other sites and services, Netflix for instance, have also started to make use of it but not to the extent that it is used on the YouTube video hosting site.

You can check if your browser supports MSE by visiting YouTube's HTML5 Video Player page. If you are using any version of Firefox except Firefox Nightly you will notice that all three Media Source Extension checks fail in the browser.

Other browsers, Google Chrome on all platforms or Internet Explorer on Windows 8 or newer support Media Source Extensions either completely or at least partially.

Mozilla has been working on integrating Media Source Extensions in Firefox for quite some time. The Nightly version of the web browser supports Media Source Extensions since May 2014 and while development has not been completed yet on the integration, it works well for the most part.

Up until now you had to change a parameter in Firefox's advanced configuration to enable support for MSE in the browser. This was done by setting the parameter media.mediasource.enabled to true.

This has changed with the most recent Nightly update as the parameter's default value is true now. What this means is that MSE is now supported by Firefox Nightly without the user having to do anything for that anymore.

While that is the case, it is unlikely that Firefox 36 will be the first stable version of Firefox to support Media Source Extensions. As mentioned earlier, development is not complete yet and Mozilla plans to disable the feature before the stable channel hits version 36.

Firefox users who notice issues when using video streaming services may want to consider turning off Media Source Extensions in the browser to see if that resolves the issues. All that needs to be done for that is to set the parameter above to false. (via Sören)

Update: Mozilla introduced two new parameters recently that handle Mp4 and WebM support in Media Source Extensions. For full support, make sure that the parameters media.mediasource.mp4.enabled and media.mediasource.webm.enabled are set to true in Firefox.

As their names suggest, these two parameters define whether support for webm or mp4 is enabled or not in Firefox when Media Source Extensions are used.

Summary
The state of Media Source Extensions in Firefox
Article Name
The state of Media Source Extensions in Firefox
Description
A look at Firefox's implementation of Media Source Extensions, a feature used by streaming sites such as YouTube.
Author
Advertisement

Tutorials & Tips


Previous Post: «
Next Post: «

Comments

  1. Mr.Blobby said on January 29, 2015 at 6:40 pm
    Reply

    I became interested in HTML5 video after the recent security gaffes Adobe has been experiencing with Flash. I decided to uninstall Flash completely since it probably isn’t worth having anymore since plugins will always have memory corruption and thus security concerns. I some have “caveats” worth mentioning in regards to this article.

    Some users who were annoyed a while back that .mp3 and .mp4 links were being autoplayed in firefox using the built-in media player (instead of being given the option to download) have set the following options (which might negatively affect mediasource or disable it completely):
    media.windows-media-foundation.enabled = false
    media.directshow.enabled = false
    If you find the above settings, you may want to re-enable them again.

    Additionally for NoScript users, you will find a new a new “site” to whitelist after you enable mediasource and try to view a related youtube video. It’s called “mediasource:” (similar to “chrome:” or “resource:” or “about:”). It’s a local resource “site” that needs to be manually whitelisted, otherwise the related youtube video will instantly error and try to fallback to Flash video.

    (speculation)
    Some users may notice in the screenshot in your article, “MSE & H.264” is enabled. The preference to enable this is hidden for a reason and may cause even further bugs in youtube than simply enabling mediasource. I suggest not enabling the hidden switch (media.mediasource.ignore_codecs) because it’s probably not worth it at the moment. As a result, some videos may only show 720p as a max resolution but others will show higher resolutions, even up to 4K. It seems like resolution options are also somewhat controlled by the uploader as well.
    (/speculation)

    Also,
    media.mediasource.mp4.enabled and media.mediasource.webm.enabled are not listed in my release version 35.0.1.

  2. Paul(us) said on October 29, 2014 at 5:21 pm
    Reply

    Does this has anything to do with the fact that Mozilla plans to release Electrolysis (multi-process architecture) with Firefox 36?

    1. Neal said on October 30, 2014 at 1:25 am
      Reply

      Did they say that definitively? I know they plan to land it in nightly, but I assume even then it would be long ways off.

    2. Martin Brinkmann said on October 29, 2014 at 6:17 pm
      Reply

      I don’t think that it is related but I’m not a Mozilla developer so take that with a grain of salt.

  3. Lookmann said on October 26, 2014 at 9:37 pm
    Reply

    FF 33 gave a hell lot of problems with Flash player.

    For a change, i completely removed older version of flash player & installed latest. yet no youtube playback. so removed it. tried or tweaked plugins. nothing.

    After reading this, I enabled MSE, reset noscript whitelist ie added youtube, disabled flashblock, with only YouTube’s HTML5 Video Player installed.[open H264 always active.]

    IT”S WORKING.

    Thanks.Mr.Martin. But I miss flashblock add-on.

  4. Pd said on October 26, 2014 at 1:05 pm
    Reply

    Hmmmm you wrote a while article on this topic without mentioning DRM.

    So we finally get h.264 in Firefox and then almost at the same time, Mozilla decides to support an open standard for closed media? I remember when the tag was being promoted with the ability to right-click and save the video.

    Boy that is unlikely to last much longer now everyone can scramble their media with ‘open’ DRM (MSE).

    1. Aaron said on October 27, 2014 at 5:28 pm
      Reply

      MSE has nothing to do with DRM. I believe you are confusing the Media Source Extensions (MSE) with the Encrypted Media Extensions (EME). The later is the one that involves DRM.

  5. David said on October 26, 2014 at 11:39 am
    Reply

    Thank you

    I do have a question though…

    What is “MSE & H.264”? How can I have Media Source Extensions and H.264 separately shown as enabled yet “MSE & H.264” still shown as disabled?

    (That screenshot looks like from Firefox. How did you get “MSE & H.264” to be green/enabled?)

    1. Martin Brinkmann said on October 26, 2014 at 12:07 pm
      Reply
      1. David said on October 26, 2014 at 2:54 pm
        Reply

        I will. Thanks :-)

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.