Reputation: 472
I am trying to stop the clappr player from playing via a link. I have this code in the html of the page where my player is...
dev tools says that player.stop is not a function but I know it is a function in the clappr.js file which is in included and working.
any suggestion?
<script>
function timeOutVideo() {
this.player.stop();
}
</script>
<button onclick="timeOutVideo()">Stop</button>
Upvotes: -1
Views: 895
Reputation: 614
Is your video embedded from "YouTube"? this function will stop it
$(function(){
$('yourbutton').click(function(){
$('iframeYoutube').attr('src', $('iframeYoutub').attr('src'));
});});
Upvotes: 0