Firefox to convert old YouTube Flash code to HTML5 Video

Martin Brinkmann
Jan 16, 2016
Firefox
|
18

Mozilla has added a feature to Firefox 46 that will convert old YouTube Flash code to HTML5 Video automatically under certain circumstances.

When YouTube started out, Flash was the dominating technology used to stream video on the Internet, and the first player that YouTube made available to webmasters to embed videos on third-party sites used Flash exclusively.

YouTube changed the code later on to reflect changes in streaming technologies. From a technical perspective, YouTube started to offer embed codes as iframes instead of objects.

The Flash code works fine after all these years, but only if Adobe Flash is installed in the browser. If that is not the case, a "plugin is missing" error message is displayed.

If you take this old Ghacks article on Line Rider, and there specifically the first video embedded on the page, you will get the error message "A plugin is needed to display this content" if Flash is not installed in the browser or blocked on the site.

firefox flash embed

The second video on the same page uses the new embed code and it won't show the error message as the HTML5 video player is used in this case automatically.

Since Mozilla does not have the luxury of a native Flash integration and the fact that plugins will be a thing of the past in the near future, something had to be done about that.

Mozilla added code to its Firefox web browser to convert embedded YouTube videos using the old Flash embed code to the new embed code if Flash is not installed or enabled on the page. This affects YouTube embeds on third-party sites only.

It needs to be noted that Firefox won't enforce the use of HTML5. If Flash is installed in the browser, nothing changes at all as Flash will be used in the case to power the video player.

Deactivate the feature

Mozilla plans to launch the feature in Firefox 46. It is already part of the organization's Nightly web browser and enabled by default.

firefox youtube embed

Firefox users who don't require the feature, can deactivate it in the following way:

  1. Load about:config in the browser's address bar.
  2. Confirm that you will be careful if a warning prompt is displayed.
  3. Find plugins.rewrite_youtube_embeds using search.
  4. Double-click on the preference name.

If you set it to false, Firefox will not rewrite old Flash YouTube embed code if Flash is not installed or enabled.

You may change the preference to its default value at any time by repeating the process outlined above.

Closing Words

While I don't encounter many old YouTube videos embedded on third-party websites, it seems to have been something of a problem for part of Mozilla Firefox's user base.

The way it is implemented offers the best of both worlds as users who don't want the feature can disable it easily in the browser's advanced configuration dialog. (via Sören Hentzschel)

Summary
Firefox to convert old YouTube Flash code to HTML5 Video
Article Name
Firefox to convert old YouTube Flash code to HTML5 Video
Description
Mozilla Firefox 46 ships with an automated setting that converts YouTube Flash code to HMTL5 on third-party sites if Flash is not installed in the browser.
Author
Publisher
Ghacks Technology News
Logo
Advertisement

Tutorials & Tips


Previous Post: «
Next Post: «

Comments

  1. Ook said on August 5, 2016 at 2:01 am
    Reply

    @Omega: Still stuck on that old record ?

    Whether or not you like Flash, the fact is that removing it has sent back web gaming 10 years in the past, and video 5 years.

    Still today, 1080p performance on Youtube takes a lot more CPU with HTML5 Video than with Flash, and gaming performance is a joke. Almost ten years have passed trying to catch up with Flash, we’re still not there.

    Standardisation has upsides but this would have been done way better without this stupid, emotional and counterproductive war on Flash that killed incentives to further develop 3D capabilities and tooling, even for Unity, and drove game developers away from the web platform. Remember Drakensang Online, before Diablo 3 ? That was one possible future for the web. Bigpoint, a pretty big german company, had a whole strategy built around this.

    We’ll get there again, perhaps in 2020, thanks to ASM.js and SIMD. If there is momentum. Nowadays high quality games developers and companies have fled the web platform because it is so unstable and underperforming.

    And that is all because of the war on Flash. Security and privacy wise, we now have to install games on phones and computers which is obviously worse. (I’m not against desktop games and apps, that’s not the point)
    Click to play Flash is rather secure. (Yes, full Flash allow is not clever, and neither is full JS allow)

  2. Omega said on January 18, 2016 at 5:53 am
    Reply

    Good. Flash should die a horrible death.

  3. Dave said on January 17, 2016 at 3:51 pm
    Reply

    Is there a userscript that does this? I found an old one but it didn’t work on the old gHacks page linked.

    1. George said on January 17, 2016 at 5:17 pm
      Reply
  4. Sintendo said on January 17, 2016 at 8:57 am
    Reply

    There’s already an add-on for that: https://addons.mozilla.org/en-US/firefox/addon/no-flash/

  5. Mikr\e J. said on January 17, 2016 at 3:49 am
    Reply

    Doesn’t seem to have caught up with Waterfox or Cyberfox (I gave up on PM).

    1. A different Martin said on January 18, 2016 at 1:49 am
      Reply

      [Off topic:] Did you give up on Pale Moon because of incompatible extensions? The small but slowly growing number of sites that don’t fully support it or don’t support it at all? I maintain a 32-bit Firefox install for Google Talk, Google Maps, and the odd other site that shuns Pale Moon, but Pale Moon x64 is still my default browser.

  6. Mozinet said on January 16, 2016 at 9:18 pm
    Reply

    With pref off, my Firefox Nightly 46 displays the Flash Player. With pref on, it displays the HTML5 player. So I have Flash on and Firefox rewrites old code when pref value is true.

  7. scylla said on January 16, 2016 at 9:12 pm
    Reply

    I am disappointed that Firefox still won’t play Flash video streams from the wildlife cams that I watch. Browsers like Puffin and Photon will do it for Android phones/tablets but there’s nothing for the Windows OS.

  8. Drugoy said on January 16, 2016 at 6:28 pm
    Reply

    Finally there’s something good coming from Mozilla.
    I got a bit tired to manually update flash’s .dll’s (I use pure .dll’s because I refuse to install adobe’s updater right into the system) on the PCs I manage.
    I know I could turn off ‘extensions.blocklist.enabled’, but that’d result into me forgetting to update flash plugin on those PCs and thus those PCs would end up using outdated (and probably vulnerable to some new exploits) versions of the plugin, which is not good.
    I’d just switch off that plugin completely (since users in 99.9% of cases use it for youtube), but I can’t, since the users are regularly visiting crappy sites with poor embedding of youtube videos and I have nothing else left to do other than to upload the updated *.dlls :(

  9. Rick said on January 16, 2016 at 6:20 pm
    Reply

    What a colossal waste of time.

    Maybe they will re-release Netscape 4.0 for nostalgia too ;)

    1. Jason said on January 20, 2016 at 2:52 am
      Reply

      Not a waste of time, just a practical necessity. If they hadn’t done this, they would get bombarded by complaints about “videos not working anymore” as soon as browser plugin support ended. With a little minor effort, Mozilla can avoid the bad vibes.

      Of course, Flash must still die an ugly death, and one of these days it will.

  10. not_black said on January 16, 2016 at 5:46 pm
    Reply

    This is truly great!

  11. Tom Hawack said on January 16, 2016 at 4:52 pm
    Reply

    I don’t encounter many old YouTube videos embedded on third-party websites as well, but this is nevertheless good news for users who disabled/removed the Flash player plug-in.

    A pity though that it concerns only YouTube embedded videos because the very few sites apparently reluctant to move from Flash to HTML5 technology and of which I miss the video content have their own video content providers.

    A good step forwards. If we complain let us applause when applicable.

  12. Nebulus said on January 16, 2016 at 4:43 pm
    Reply

    I understand that the purpose of this change is to help the users transition from Flash fro HTML5, but I still think that a browser should show the users what the original site author had in mind, not what the browser programmers think the users needs to see. Other than that, it is great that the option can be changed in order to allow each user to do how he or she sees fit.

    1. Bleep said on January 17, 2016 at 9:32 pm
      Reply

      for people like you,that think flash is a “suitable option”, read this:

      1- Mozilla is known for it’s privacy policy. mozilla does not make it’s software based on “how the devs think the user needs to see”. mozilla NEVER used that philosophy as far as I know. also, the purpose of that feature is not to “help the users transition from flash to html5”, the purpose is privacy and security. and this feature will not change the way you watch videos, neither change it’s position. it’s the same way, the only difference is on it’s code. I use youtube as HTML5, I dont even have flash installed and youtube is just fine and acting like it was when I used flash… the difference is almost imperceptible.

      2- flash is going down soon. despite it was, and is, a powerful thing, it has a lot of security and privacy problems. some hackers say that they can control your computer by just bypassing flash player’s security through it’s uncountable bugs – which is quite easy according to them… (if I can find the video I watched I will add it here). despite the efforts of Adobe to secure flash, third party entities and hackers find more and more bugs on it’s security. that is why flash is dying slowly and HTML5 is taking the control over all the internet. flash was and is a great thing, but with it’s problems it is not a plugin to use… this is my opinion.. people are free to use flash till the day Adobe is forced to close it’s development over flash because nobody is using flash plugin anymore – and I think that day will come in the next 5-7 years or even sooner.

    2. neo said on January 16, 2016 at 5:40 pm
      Reply

      Good that you can disable the feature. The addons Greasemonkey and Stylish are pretty popular and both are used to modify the looks and operation of websites away from how the website creator first intended. This new change is something similar, only for one specific issue and built in.

    3. Caspy7 said on January 16, 2016 at 5:05 pm
      Reply

      Reality: Mozilla Brokers World Peace!
      Peanut Gallery: Mozilla Fails to Broker World Peace in Reasonable Amount of Time – and we’re a little miffed about the lack of input gathered for the new logo.

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.