Create pause link for clappr player

831 views Asked by At

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>
1

There are 1 answers

3
khalid J-A On

Is your video embedded from "YouTube"? this function will stop it

$(function(){
$('yourbutton').click(function(){      
    $('iframeYoutube').attr('src', $('iframeYoutub').attr('src'));
});});