The information here: “Stop multiple videos” is useful if you want to stop multiple videos with a given class/tag name, however I am currently working with <iframe>
embedded videos, and needed them to stop playing when moving between scenes.
Here is a simple technique to stop all iframe embedded videos from playing, by setting the iframe src
value to itself.
var elements = document.getElementsByTagName('iframe');
for (var i=0; i<elements.length; i++) {
var src = elements[i].src;
elements[i].src = src;
}