I have 4 sections with 4 youtube videos inside. When uploading, all videos are paused and only the video in the first section automatically plays with video and audio. When the slide is changed, the next video goes into play but the previous one is stopped instead of being paused.
I have 4 sections with 4 youtube videos inside. When uploading, all videos are paused and only the video in the first section automatically plays with video and audio. When the slide is changed, the next video goes into play but the previous one is stopped instead of being paused.
Checking with the browser debug (Firefox) I noticed that the tag "?enablejsapi=1" is added for Youtube and "?api=1" for Vimeo.
Play is activated, then the following code is executed:
But when changing splides the "pause" command is not executed:
What is missing to pause videos instead of being stopped ?