title: Get Safari to prefer HEVC in HTML 5 video tag
body: <p>I'm currently investigating the feasibility of adding HEVC support to videos but am hitting a problem with Safari. Here's the sample source:</p>
  
  <pre><code>&lt;video autobuffer="true" autoloop="" loop="" controls=""&gt;
      &lt;source src="film_WebM.webm" type="video/webm"&gt;
      &lt;source src="film_HEVC.mp4" type="video/mp4"&gt;
      &lt;source src="film.mp4" type="video/mp4"&gt;
  &lt;/video&gt;
  </code></pre>
  
  <p>Ideally a browser should read the sources and takt the <strong>first</strong> 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.</p>
  
  <p>Is there any way to solve this without using feature detection to manipulate the <code>src</code> element?</p>
  
  <p>Filed with Apple as a Safari bug #37821806</p>
  
  <p>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 <a href="https://codepen.io/cloudunder/pen/NBmZzx" rel="noreferrer">codepen demo</a> and note in comments what codec play and Mac hardware info.</p>