title: Safari Picture In Picture - custom HTML5 video controller
body: <h3>Safari HTML5 custom video controller with Picture In Picture (PiP)</h3>
  
  <p>At the <strong>WWDC15</strong> Apple introduces Safari 9 <em>(Safari 10 for MacOS)</em>, there now have support for Picture in Picture.</p>
  
  <p><a href="https://i.stack.imgur.com/jorI6.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jorI6.jpg" alt="enter image description here"></a></p>
  
  <p>However, they just say:</p>
  
  <blockquote>
    <p>If you use custom HTML5 video controls, you can add Picture in Picture functionality using the JavaScript presentation mode API.</p>
  </blockquote>
  
  <p>but not telling how or where to find its documentation.</p>
  
  <p>The default video controller has the button, but how do I trigger it by javascript?</p>