Hacker News new | ask | show | jobs
by hadrien01 1376 days ago
When the first iPhone was released, YouTube used Flash instead of HTML5. Safari had special code to play the video with the native player instead of displaying a blank square. I suppose (from the flash-specific detection in the supportsMIMEType method) that this code was in charge of that logic.
2 comments

Note that while the code was written in 2014 (well after the iphone was released), someone tried to remove the code this year[1], and gave up because some sites now rely on this hack.

[1]: https://github.com/WebKit/WebKit/commit/049188a35af6c67fa30c...

Of course, all observable behaviors of your system will be depended on by somebody.
Relevant xkcd: https://xkcd.com/1172/
The code was added to the public WebKit source tree, but it wasn't written at the time. It was upstreamed from the internal fork of WebKit that Apple used for iOS.
Do you know how long this fork existed?
Sorry, I don't recall.
It didn't specify which websites, now I'm curious.
Also the youTubeFlashPluginReplacementEnabled settings property that it looks for to check if it’s enabled seems like a strong hint.