<script src='https://content.jwplatform.com/libraries/i511f6Xb.js'></script>
<script>jwplayer.key='YOUR_KEY';</script>
<div id="player">Loading the player...</div>
<script>
// Setup the player
const player = jwplayer('player').setup({
file: 'http://content.jwplatform.com/videos/SJnBN5W3-mjpS2Ylx.mp4',
volume: 10
});
// Listen to an event
player.on('pause', (event) => {
alert('Why did my user pause their video instead of watching it?');
});
// Call the API
const bumpIt = () => {
const vol = player.getVolume();
player.setVolume(vol + 10);
}
document.querySelector('#bumpit').onclick = () => { bumpIt(); }
</script>