Try this:
Change this line of code in your plugin
if($youtubeoptions['hd']=='usehd') $ytsghd = 'hd=1'; else $ytsg = 'hd=0';
to this (for 720p)
if($youtubeoptions['hd']=='usehd') $ytsghd = 'vq=hd720'; else $ytsg = 'hd=0';
or to this (for 1080p)
if($youtubeoptions['hd']=='usehd') $ytsghd = 'vq=hd1080'; else $ytsg = 'hd=0';