Home Forums Community Forum Stop a self hosted video when closing a modal
Search for:
Tagged:modal, javascript, html5 video, stop video
Viewing 2 posts - 1 through 2 (of 2 total)
- AuthorPosts
- dunn123ParticipantNovember 18, 2020 at 3:21 pmPost count: 1#819423
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
marklchavesParticipantNovember 19, 2020 at 9:38 amPost count: 829#819878Hi @dunn123,
Youll need to have a JavaScript function to stop the video. Then, you should be able to add an event listener to the modals close button to call the stop function when the close button is clicked.
Heres a demo.
Shout if you have any questions.
Cheers,
mark
- AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Username:
Password:
Keep me signed in
Log In
Was this topic helpful?
YESNO{+votes}{-votes}