Page 2 of 2

Youtube embedded video disruption on back button navigation

Posted: Mon Oct 20, 2014 12:50 pm
by Evgene Karachevtsev

Hello Cody,

You can call the following code when switching to another page:
predocument.querySelector('[name="youtube_2"]').contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}', '*');/pre
Where youtube_2 is the name of your youtube component


Youtube embedded video disruption on back button navigation

Posted: Mon Oct 20, 2014 1:03 pm
by Evgene Karachevtsev

Cody,

You can also try this way:
preApperyio("youtube_2").data("youtube-player-object").stopVide();/pre