Avada Forums Community Forum Stop a self hosted video when closing a modal

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • dunn123
    Post count: 1

    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.


    Post count: 873

    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.

    Here’s a demo.

    Shout if you have any questions.



Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.