mam problem z kontrolowaniem playerów Youtube na stronie.
mam wstawiony skrypt tzw karuzeli z filmami YT wstawionymi jako iframe:
<div id="icarousel"> <iframe id="ytplayer1" class="yt1 ytp" type="text/html" width="560" height="315" src="https://www.youtube.com/embed/dHy9W9LpvlQ?enablejsapi=1" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="" data-outerwidth="496" data-outerheight="276" data-width="480" data-height="260" index="0" style="visibility: visible; position: absolute; opacity: 1; overflow: hidden; top: 12px; z-index: 999; -webkit-transform: none; left: -3px; width: 480px; height: 260px; -webkit-transition: all 0.5s cubic-bezier(0.42, 0, 0.58, 1);"></iframe> <iframe id="ytplayer2" class="yt2 ytp" type="text/html" width="560" height="315" src="https://www.youtube.com/embed/dHy9W9LpvlQ?enablejsapi=1" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="" data-outerwidth="496" data-outerheight="276" data-width="480" data-height="260" index="0" style="visibility: visible; position: absolute; opacity: 1; overflow: hidden; top: 12px; z-index: 999; -webkit-transform: none; left: -3px; width: 480px; height: 260px; -webkit-transition: all 0.5s cubic-bezier(0.42, 0, 0.58, 1);"></iframe> <iframe id="ytplayer3" class="yt3 ytp" type="text/html" width="560" height="315" src="https://www.youtube.com/embed/dHy9W9LpvlQ?enablejsapi=1" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="" data-outerwidth="496" data-outerheight="276" data-width="480" data-height="260" index="0" style="visibility: visible; position: absolute; opacity: 1; overflow: hidden; top: 12px; z-index: 999; -webkit-transform: none; left: -3px; width: 480px; height: 260px; -webkit-transition: all 0.5s cubic-bezier(0.42, 0, 0.58, 1);"></iframe> <iframe id="ytplayer4" class="yt4 ytp" type="text/html" width="560" height="315" src="https://www.youtube.com/embed/dHy9W9LpvlQ?enablejsapi=1" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="" data-outerwidth="496" data-outerheight="276" data-width="480" data-height="260" index="0" style="visibility: visible; position: absolute; opacity: 1; overflow: hidden; top: 12px; z-index: 999; -webkit-transform: none; left: -3px; width: 480px; height: 260px; -webkit-transition: all 0.5s cubic-bezier(0.42, 0, 0.58, 1);"></iframe> </div>
Potrzebuję skryptu który pauzował by film gdy jest "z tyłu" karuzeli.
Na początek kombinowałem żeby jakoś kontrolować pauzowanie filmów ale okazuje się, że znalazłem tylko opcję kontroli filmów które są jako "embed".
<embed id="playerid" width="500px" height="400px" allowfullscreen="true" allowscriptaccess="always" quality="high" bgcolor="#000000" name="playerid" style="" src="http://www.youtube.com/v/LpbzbyGjJGE?enablejsapi=1&version=3&playerapiid=ytplayer" type="application/x-shockwave-flash">
Niestety podczas przełączania filmów w karuzeli ten player brzydko się skaluje :/
Czy jest możliwość zastosowania podobnego skryptu do filmów z iframe?