Kenny Johnson
Kenny Johnson

Reputation: 472

Create pause link for clappr player

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

Answers (1)

khalid J-A
khalid J-A

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

Related Questions