Facebook switches to HTML5 for all video instead of Flash

Five years after building its first HTML5 video player Facebook has finally moved entirely away from Flash for video.
Written by Liam Tung, Contributing Writer

Facebook has moved to HTML5 by default in all browsers for web videos that appears on its News Feed, Pages and the embedded Facebook video player.

Setting Adobe's Flash aside for video marks a significant change for the company, which built its first HTML5 video player five years ago. Back then it only supported iPhones and iPads, but retained Flash for other mobile browsers due to it outperforming HTML5.

Despite seeing promise in HTML5 for video, Facebook has outlined the numerous challenges that have kept it from making a complete switch from Flash across all platforms.

"In theory, most browsers in use support HTML5 video. However, in practice we noticed that a lot of the older browsers would simply perform worse using the HTML5 player than they had with the old Flash player. We saw more errors, longer loading times, and a generally worse experience," Facebook engineer Daiel Baulig wrote in a blog post last week.

"That's why we waited until recently to ship the HTML5 player to all browsers by default, with the exception of a small set of them," he added. The social media giant will continue to use Flash in games.

Adobe has also announced its transition away from Flash Player and that it's working on a new HTML5 video player. That came a few months after Facebook's chief security officer called upon Adobe to set an "end-of-life" for Flash.

Other issues that have kept Facebook from making video HTML5 by default included slower load times, more difficulty acquiring accurate user metrics, and browser bugs.

Baulig noted that on average it took "slightly longer" for Facebook to load when it shipped the HTML5 player but said: "By fixing several small performance regressions and making multiple micro-optimizations, we finally reached a level we felt happy with shipping."

A bug in Chrome's implementation of the SPDY protocol stopped videos loading in Facebook's News Feed until Facebook worked out the problem was triggered by loading too many videos concurrently, so it reduced the number of videos it loads at the same time.

Editorial standards