Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Avada › Forums › Community Forum › Stop a self hosted video when closing a modal
Tagged: modal, javascript, html5 video, stop video
Anyone know how to stop a self-hosted video from playing in a modal when the modal is closed.
I have tried api_params=”&enablejsapi=1″ but I am presuming this is a YouTube element as it has no effect on a self-hosted video.
Thanks
Hi @dunn123,
You’ll need to have a JavaScript function to stop the video. Then, you should be able to add an event listener to the modal’s close button to call the stop function when the close button is clicked.
Shout if you have any questions.
Cheers,
mark