Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Youtube embedded video disruption on back button navigation

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

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Youtube embedded video disruption on back button navigation

Cody,

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

Return to “Issues”