Page 1 of 1

Stop YouTube on click

Posted: Thu Aug 04, 2022 11:45 pm
by thisazlife
I am trying to show a youtube video and then stop it and hide it when you click the X object. I have X object set to onclick, stop media "youtube object ID name" but it doesn't stop. How do I stop youtube from continuing to play after I hide the object? Thanks so much!

Re: Stop YouTube on click

Posted: Fri Aug 05, 2022 12:51 am
by BaconFries
Not exactly what you asked but might point you in the right direction.
http://jsfiddle.net/ZcMkt/

Re: Stop YouTube on click

Posted: Fri Aug 05, 2022 5:33 am
by Pablo
How do I stop youtube from continuing to play after I hide the object?
Did you enable JS API in the YouTube properties?

Re: Stop YouTube on click

Posted: Fri Aug 05, 2022 3:41 pm
by thisazlife
Yes, it defaulted checked and I tried unchecking it as well. I figured out a work around by downloading the YouTube video and using HTML5 Video instead, not ideal but it is working.