I would like to write an extension that modifies the quality of the youtube videos automatically.

However, when I am writing the JS file, I have problem to get the ID of the player. For I have to use document.getElementById("playerId"), then I can use the function player.setPlayBackQuality('hd720').

I tried to find player ID by searching the source code of youtube page, but I can not find any ID like that.

So is there any function like document.getPlayerId() in Javascript or youtube?