Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Player actions


Hi, I am embedding a video from the platform using the embed script provided. I would like to do 2 things;
1. I want to create a custom <a href="#"> button and have it play the embedded video upon clicking it.
2. I would like the div containing the video script to automatically close when the video ends.

Please let me know how I may go about this.

Thank you

1 Community Answers

Todd

JW Player Support Agent  
0 rated :

1) <a href="#" onclick="jwplayer().play(true);"> would probably do what you need.

2) My suggestion would be to call remove() inside an ‘onComplete’ event:

jwplayer().on(‘complete’,function(){
jwplayer().remove();
});

This question has received the maximum number of answers.