The solution for me was native youtube API. (from https://developers.google.com/youtube/iframe_api_reference#setPlaybackQuality )
See Demo!
(But it has one bug: you can switch to Upper Quality, but then it doesnt go to lower quality...)
<div id="MyPlayerDivIDD1"></div> <div id="MyQualities"></div>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript" src="http://www.youtube.com/player_api"></script>
<script type="text/javascript">
function onYouTubePlayerAPIReady() {
ytp1 = new YT.Player('MyPlayerDivIDD1', { height: '200', width: '290', videoId: 'Rk6_hdRtJOE', playerVars: { 'autoplay': 1, 'controls': 1 , 'autohide':0,}, events: {'onReady': onPlayerReady, 'onStateChange': onPlayerStateChange } });
var startedd=false; var MyQuality;
}
function onPlayerReady(event) {}
function onPlayerStateChange(event) { if (event.data == YT.PlayerState.PLAYING && !startedd) { SetQuallll(event);startedd=true; } }
function SetQuallll(event) { MyQuality = MyQuality || 'tiny'; event.target.setPlaybackQuality(MyQuality); }
</script>
<br/> <a href="javascript:ShowMenu();">SHOW QUALITY Switcher </a>
<script>
function ShowMenu(){
AllQualities = ytp1.getAvailableQualityLevels(); AllQualities.push("hd720"); AllQualities.push("hd1080");
for (var i=1; i<AllQualities.length; i++) { document.getElementById("MyQualities").innerHTML += ' <a href="javascript: startedd=false; MyQuality=\''+AllQualities[i]+'\'; alert(\'Current Qualityy:\'+ytp1.getPlaybackQuality() + \' --------- Switching To:'+AllQualities[i]+'\'); ytp1.pauseVideo(); ytp1.setPlaybackQuality(\''+AllQualities[i]+'\'); ytp1.playVideo(); void(0); ">'+i + ')' + AllQualities[i]+'</a> '; }
}</script>