Skip to content
A polyfill to add W3C Picture In Picture API in safari
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets feat(test): init test stack May 10, 2018
test chore(test): add warning on non safari browser Dec 12, 2018
.gitignore feat(test): init test stack May 10, 2018
package.json feat(lint): add eslint May 11, 2018
pip.js feat(api): add document.pictureInPictureEnabled API Nov 30, 2018
yarn.lock feat(lint): add eslint May 11, 2018


tests status

Why a picture in picture polyfill

The w3c has described a standard API that should be implemented by every browser willing to add picture-in-picture (pip) features on the video element. However, Safari has to this date implemented an other api, making it difficult for web developers to develop and maintain pip features on their website.

We therefore want to provide a polyfill that will add the w3c pip API to safari.

How do I use it ?

The polyfill is a ~100 lines single file, that you can find here. Feel free to use this in your own code !


The polyfill is fully tested. If you want to see the results of the tests, go here


If you want to play around with the w3c api in safari, open this page in your browser, and use the api in the console !

You can’t perform that action at this time.