I'm currently investigating the feasibility of adding HEVC support to videos but am hitting a problem with Safari. Here's the sample source:
<video autobuffer="true" autoloop="" loop="" controls="">
<source src="film_WebM.webm" type="video/webm">
<source src="film_HEVC.mp4" type="video/mp4">
<source src="film.mp4" type="video/mp4">
</video>
Ideally a browser should read the sources and takt the first file that it thinks it can read and this should allow Firefox and Chromium to show the VP9 film, Safari the HEVC and Internet Explorer the H264. However, Safari doesn't play nicely and will ignore the HEVC film if the H264 is present. I've tried annotating the source with codec information but this doesn't help. Setting HEVC as the default source for the video element works for Safari but causes problems for every other browser.
Is there any way to solve this without using feature detection to manipulate the src
element?
Filed with Apple as a Safari bug #37821806
The discussion below suggests that Safari could, despite Apple's own release notes, be deciding to use an AVC source based on hardware considerations. How it manages to do this without codec hint or apparent mime-type sniffing is unclear. It would be useful if people could test the codepen demo and note in comments what codec play and Mac hardware info.