Answer the question
In order to leave comments, you need to log in
How to stop youtube video when another youtube video starts playing?
There is a slider with videos that are inserted into an iframe.
It is necessary to stop the already playing video when you turn on any other.
Tried like this
$('.video .slides li').change(function(){
$('video').contentWindow.postMessage('{"event":"onclick","func":"pauseVideo","args":""}', '*');
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question