HTML5 is the future of video. Probably. Or if not HTML5, its successors. It seems that the whole web has rallied behind the desire to get rid of third-party plugins - especially closed plugins like Flash. And so every major new web browser now supports native video playback via a <video> tag.

Given this climate, you would think that a leading open-source HTML5 video player like Video.js would be encouraging people to move away from Flash and towards native browser playback. So it may be surprising that a built-in Flash player has been added to the newest version of Video.js, the HTML5 player framework created by Zencoder. What is going on here?

This seeming contradiction has an easy explanation. Web video playback requires two things: an application framework and video decoding. As it turns out, HTML5 is now a mature, feature-complete application framework for video playback. But it is not yet a mature video decoder, due to some important feature limitations.

Flash was originally designed to be a front-end application framework. A decade ago, people built entire websites in Flash. This had some advantages - Flash had significantly more rich presentation functionality than HTML. It also had some disadvantages, and over time, it became widely acknowledged that entire websites shouldn't be built in Flash. As Flash waned, Javascript waxed. If you want to build a rich web presentation layer today, you use Javascript. Even Adobe does it.

But Flash found a second life a number of years ago as the only web-based video player with near-universal browser penetration. When YouTube sparked the ongoing explosion of web video, they used Flash as a video player, and so did everyone else. Contrarians like Netflix used a different plugin - Silverlight - but the approach was the same. Build a video player application using a third-party plugin. The plugin might be heavyweight, and it might mean that you have to learn a new application framework, but at least it enabled high quality, widespread web video.

ALSO ►  The NBA is Crushing Other Sports Brands on Social Video

Virtually everyone doing HTML5 video today still uses Flash as a fallback mechanism for browsers that don't support HTML5 (about 25%), or that don't support a given codec (WebM vs. H.264) or feature (adaptive streaming, DRM). And so even for those who have embraced HTML5, most video on the web ends up being played via Flash.

Last week, we changed our approach at Video.js to front-end video playback. The newest version of Video.js adds a built-in Flash player, but moves all of the presentation logic out of Flash and into HTML. So player chrome, buttons, settings, and behavior are entirely controlled via Javascript, whether a video is decoded with Flash, HTML5, native decoding (iOS), etc.

This has many obvious advantages.

  • First, the same Javascript API can now be used to govern playback across many different playback technologies. Configuration (autoplay? autobuffer? full screen?) is done once, no matter how many devices or decoders are used. This means that styles and settings are handled once, in Javascript and CSS, making for easier development and design. You don't need to know Flash or hire a Flash developer to change how the player looks.
  • Second, advanced features no longer have to be implemented twice. Previously, if you wanted playlists in both Flash and HTML5, the typical approach was to use a Flash player that supported playlists, and use a separate HTML5 player for HTML5 playlists. This was redundant and unnecessary.
  • Third, more logic is moved out of Flash and into JavaScript, which is a good thing. The web has already transitioned from Flash to Javascript for rich front-end applications - it is time that video applications do the same.
  • Fourth, this approach allows for significant performance optimization. The Flash player that ships with Video.js is 10kb in size. For comparison, a full-featured Flash player like FlowPlayer is 120kbps.
ALSO ►  Video Will Account for 70% of All Mobile Traffic by 2021 [Report]

So Flash isn't dead. It has just pivoted. In 2002 it was an application framework. In 2007 it fell out of favor as a rich application framework, but gained ground as a video playback application. And now, in 2012, Flash no longer needs to be used as a full-featured video player. Now it is a bare, unstyled window - a video decoder that can be embedded in an HTML5 application to enable codecs, streaming standards, and features not supported natively by browsers.

Is this ideal? Not really. Unified video playback is preferable, but realistically, universal HTML5 playback is still a long way out. But until then, there are options that represent a major improvement over traditional heavyweight Flash video players.