/pip-polyfill

A polyfill to add W3C Picture In Picture API in safari

Primary LanguageJavaScript

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 !