picture-in-picture

1.0.2 • Public • Published

picture-in-picture

import pip from 'picture-in-picture'
 
// or
const pip = require('picture-in-picture')

One API for picture in picture in all supported browsers

API

pip.supported: Boolean

True if pip is supported in this browser.

If false, all bellow methods will be undefined!. Do not call pip methods unless this is true.

pip.request(videoEl)

Requests picture in picture for given video el.

pip.exit(videoEl)

Exits picture in picture for given video el.

pip.isActive(videoEl): Boolean

Returns true or false, whether picture in picture is active for given video el.

Package Sidebar

Install

npm i picture-in-picture

Weekly Downloads

4

Version

1.0.2

License

MIT

Unpacked Size

2.84 kB

Total Files

3

Last publish

Collaborators

  • andytjoslin