V-Pip
Tiny vue wrapper for supporting native picture-in-picture mode.
Requirements
- Vue.js 2.x
Installation
CDN: UNPKG | jsDelivr (available as window.VPip
)
Usage
Register the component globally:
Or use locally
Example 2 (minimal)
HTML
JS
Props
Name | Type | Required? | Description |
---|---|---|---|
video-options |
Object | Yes | The set of options required to setup the V-Pip component. defaults: L32-L42 |
button-options |
Object | No | The set of options for the toggle button defaults: L48-L53 |
Events
Name | Description |
---|---|
video-in-pip |
Emits an Boolean whether the Video is in PIP or not |
requesting-pip-failure |
Emits an Object when the video fails to enter Picture-in-Picture mode. |
exiting-pip-failure |
Emits an Object when the video fails to leave Picture-in-Picture mode. |
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D