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.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets feat(test): init test stack May 10, 2018
demo
test chore(test): add warning on non safari browser Dec 12, 2018
.eslintrc.json
.gitignore feat(test): init test stack May 10, 2018
README.md
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

README.md

pip-polyfill

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 !

Tests

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

Demo

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.