I am using Jwplayer for my videos to be played. so i was using JS fiddle to test JWplayer API
I had included JS file as instructed in jsfiddle. Video works fine but i am tring to have one button other than player control to pause/play the video .
but it doesnt seems to work i am not able to understand the problem
help me out here
<body>
<div id='my-video'></div><br>
<div id="content" style=" text-align: center;">
<button name='play' id='play' value='play' onclick='play();'>Play</button>
<button name='pause' id='pause' value='pause' onclick='pause();' style='display: none;'>Pause</button>
</div>
</body>
<script>
jwplayer('my-video').setup({
file: 'http://content.bitsontherun.com/videos/lWMJeVvV-364767.mp4',
width: '640',
height: '360'
});
function play() {
jwplayer().play();
document.getElementById('play').style.display = 'none';
document.getElementById('pause').style.display = 'inline-block';
}
function pause() {
jwplayer().pause();
document.getElementById('pause').style.display = 'none';
document.getElementById('play').style.display = 'inline-block';
}
</script>
Thank you
Here is the [DEMO LINK][1]`http://jsfiddle.net/hiteshbhilai2010/f6ufe/17/`