I have found the following javascript (added below) to stop audio from an embedded html video when leaving a layout or scene, however I have embedded my video using a rectangle element. Is there another version of javascript which will give the same result?
Thanks
var emptyInnerHTML = '';
hypeDocument.getElementById("video1").innerHTML = emptyInnerHTML
This actually does not look like it would work (pauseVideo is not a thing), and my.player (at least based on your code) isn't an object. Can you share what you have?
I am looking for the embedded YouTube video to stop if a new layout has triggered or if a new scene has opened. Before I added this code (pauseVideo) the audio would still be playing in the background even if viewing another scene or change of layout. I found the code I linked in my first post but this doesn’t work as I have embedded the YouTube video within a rectangle element which you can see in the sample project.