Martin Algesten Martin Algesten - 3 months ago 15
Javascript Question

How do I trigger picture in picture on Safari 10

Safari 10 introduces picture in picture. The button is there for html5 video standard controls, but how do I trigger it by javascript?

Apple says:

If you use custom HTML5 video controls, you can add Picture in Picture functionality using the JavaScript presentation mode API.

With no further references.


Use Javascript to activate the picture-in-picture mode. It will run by this way.