javascript - How can I change playBackrate? -


i've read this document controlling playback rate.
coded in order to implement.

however, seems not working.
what's wrong code?

<script type="text/javascript">     var params = { allowscriptaccess: "always" };     var atts = { id: "myytplayer" };     swfobject.embedswf("http://www.youtube.com/e/nqd6wx3hxzy?enablejsapi=1&playerapiid=ytplayer",         "ytapiplayer", "480", "270", "8", null, null, params, atts);           function onyoutubeplayerready(playerid) {             ytplayer = document.getelementbyid("myytplayer");             timerid = setinterval("getstatus()", 1);          }  </script>  <div id="ytapiplayer">...loading</div> 

the button change playbackrate

<button onclick="ytplayer.setplaybackrate(2)">playbackrate+=0.1</button> <button onclick="ytplayer.setplaybackrate(0.25)">playbackrate-=0.1</button><br> 

there nothing wrong code. not video's on youtube have ability play in more 1 playbackrate. video 1 of them. can find out playback rates video has calling ytplayer.getavailableplaybackrates().

https://developers.google.com/youtube/js_api_reference?hl=nl#getavailableplaybackrates


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -