I’ve got a button that expands/collapses a YouTube video. But, when the video player is collapsed, the YouTube video continues to play in the background. Is there any way of me pausing the video when the button is clicked to collapse the video player?
I’m using YouTube videos as it’s the easiest way of getting a video to play on a dynamic page (With the YouTube URL in the database collection).
I would also like to know if there is a way to either mute or pause the video that’s not currently being shown. I have 6 YouTube videos (using the single video player) overlapped, set to hide on load, and 6 buttons that show the applicable video, and hide the rest, except any videos already started will continue to run, with audio, in the background.