Q:

youtube api cannot change video quality

My problem was, changing quality during video playing. 
When i used setPlaybackQuality in onReady event function, quality was changed, but during video playing it was not possible.  Although onPlaybackQualityChange event returns quality which i wanted but in fact didn't changed video quality. 

player[playaID] = new YT.Player('content_'+playaID, {
    height: playaHeight,
    width: playaWidth,
    videoId: playaVID,
    playerVars: { 
        'autoplay':0, 
        'controls':0, 
        'showinfo':0,
        'fs': 1,
        'rel': 1,
        'modestbranding':0
    },
    events: {
        'onReady': onPlayerReady(playaID),
        'onStateChange':onPlayerStateChange(playaID,event),
        'onPlaybackQualityChange':onPlayerQualityChange(playaID,event)
    }
});

A:

SOLLUTION:
If you want to change quality during video playing:
1: you must stop video player.stopVideo()
2: set quality - player.setPlaybackQuality('hd720')
3: play video - player.playVideo()
below is mine function for setting quality. 
var setQuality=function(playaID,q){
    var curSeek = player[playaID].getCurrentTime(); // current video time
    var status = player[playaID].getPlayerState(); // video status
    if(status!=-1 && status!=5){ // if not started, does not to be stoped
        player[playaID].stopVide();
    }
    player[playaID].setPlaybackQuality(q);
    player[playaID].seekTo(curSeek);
    if(status!=1){
        player[playaID].paseVideo(); // if was paused   
    }else{
        player[playaID].playVideo(); // if was playing
    }
}

