I'm currently working on integrating the Picture-In-Picture (PiP) feature into video player using custom HTML5 video controls. With the recent introduction of PiP support in Safari 9 at WWDC15, I'm eager to enhance the user experience on my site.
During WWDC15, Apple unveiled Safari 9 (Safari 10 for MacOS), which introduced support for the Picture-in-Picture feature in their web browser.
However, their guidance was limited:
If you're using custom HTML5 video controls, you can integrate Picture-in-Picture functionality using the JavaScript Presentation Mode API.
Unfortunately, they did not provide specific instructions or direct users to relevant documentation on how to implement this.
While the default video controller incorporates the PiP button, the challenge lies in understanding how to activate it programmatically using JavaScript.