Is there a way to pause video placed on revolution slider slide programatically (from javascript)? From documentation it seems public API does not offer this function, only function to pause slider.
My case is that, I need to stop slider video, when some button, which starts another video is pressed.
Thanks for help...
Finally I found the solutiom looking into revolution slider source code, to see how they internally use youtube API.
Youtube player object is stored within each slide video caption in data('player')
Example:
Slider html markup
<div id="mySlider" class="fullwidthbanner">
<ul>
<!-- Slide 1 -->
<li id="slide1" data-fstransition="fade" data-transition="fade" data-slotamount="10" data-masterspeed="300">
<div class="caption sfb video" data-x="700" data-y="112" data-speed="500" data-start="1300" data-easing="easeOutExpo" data-nextslideatend="true" data-autoplay="true" data-autoplayonlyfirsttime="true">
<iframe allowfullscreen src="https://www.youtube.com/embed/xxxxxxx?rel=0&controls=1&showinfo=0&enablejsapi=1" width="448" height="267" id="slide1-video"></iframe>
</div>
</li>
</ul>
</div>
Javascript to stop embedded video in slide:
// get player object
var player = $('#slide1 .video').data('player')
// now use yt api on player object to stop video, play video or whatever you want.
player.stopVideo();