https://github.com/leandromoreira/clappr-pause-tab-visibility
A clappr container plugin to pause when user is in another tab and resume when the user is back.
https://github.com/leandromoreira/clappr-pause-tab-visibility
Last synced: 5 months ago
JSON representation
A clappr container plugin to pause when user is in another tab and resume when the user is back.
- Host: GitHub
- URL: https://github.com/leandromoreira/clappr-pause-tab-visibility
- Owner: leandromoreira
- License: bsd-3-clause
- Created: 2016-01-30T16:44:35.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-12-25T10:31:30.000Z (over 5 years ago)
- Last Synced: 2025-01-16T22:50:11.680Z (5 months ago)
- Language: JavaScript
- Homepage:
- Size: 16.6 KB
- Stars: 6
- Watchers: 4
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://img.shields.io/badge/license-BSD--3--Clause-blue.svg)
# Clappr pause/resume on tab change visibilityA [clappr](https://github.com/clappr/clappr) container plugin to pause when user is in another tab and resume when the user is back.
You can optionally show an icon to indicate its state.
```javascript
{
visibilityEnableIcon: true
}
```# Usage
```html
var player = new Clappr.Player({
parentId: '#player',autoPlay:true, mute: true,
plugins: [ClapprPauseTabVisibility],
source: 'http://www.sample-videos.com/video/mp4/480/big_buck_bunny_480p_5mb.mp4',
height: 360,
width: 640,
visibilityEnableIcon: true
})
```# Development
Install dependencies:
`npm install`
Build:
`npm run build`
Run:
`npm start`