Reputation: 671
I am using external video from Jwplayer.com. I would like to stop video after clicking on another div element. I didn't recieved any .js file or anything (i have only iframe code). Is it somehow possible?
Upvotes: 0
Views: 131
Reputation: 1148
you can do:
<div id="player"></div>
<div id="stop_player" style="margin-top:10px;"> div stop player</div>
<script type="text/javascript">
var player = jwplayer("player");
player.setup({
file: <media_path>,
});
$('#stop_player').on('click', function() {
player.stop();
});
</script>
demo: http://codepen.io//pen/xEGapz
Upvotes: 1
Reputation: 157
If you register for a free account you can grab a self-hosted library from your dashboard: https://www.jwplayer.com/pricing/
Upvotes: 0