A clappr plugin to detach video from screen
TODO
import ClapprDetachPlugin from 'clappr-detach-plugin'
const Player = new Clappr.Player({
source: 'http://www.sample-videos.com/video/mp4/480/big_buck_bunny_480p_5mb.mp4',
plugins: {
'core': [ClapprDetachPlugin]
}
})You can also configure plugin behavior using detachOptions with following options
| Property | Type | Description | values | default |
|---|---|---|---|---|
| orientation | string | It's where player will appear on detach | 'bottom-left', 'top-left', 'bottom-right', 'top-right' | 'bottom-left' |
| detachOnStart | bool | automatically detach when player starts to play | true, false | true |
| width | number | player width on detach | Any integer value | 320 |
| height | number | player height on detach | Any integer value | 180 |
| onDetach | function | callback called when player detach from original place | function | noop |
| onAttach | function | callback called when player attach on original place | function | noop |
import ClapprDetachPlugin from 'clappr-detach-plugin'
const Player = new Clappr.Player({
source: 'http://www.sample-videos.com/video/mp4/480/big_buck_bunny_480p_5mb.mp4',
plugins: {
'core': [ClapprDetachPlugin]
},
detachOptions: {
orientation: 'bottom-right',
width: 320,
height: 180,
detachOnStart: true,
onAttach: () => { console.log('Attached!') },
onDetach: () => { console.log('Detached!') }
}
})First of all, thank you for wanting to help!
- Fork it.
- Create a feature branch -
git checkout -b more_magic - Add tests and make your changes
- Check if tests are ok -
npm test - Commit changes -
git commit -am "Added more magic" - Push to Github -
git push origin more_magic - Send a pull request! ❤️ 💖 ❤️