ShelbyTV / shelby-gt-web

the new shelby web front end for rolls <over />
shelby.tv
3 stars 0 forks source link

HD button unresponsive #646

Open matyus opened 12 years ago

matyus commented 12 years ago

I'm having trouble getting the HD button working.

    "click .js-videoplayer-hd.hd-on"   : "_hdOff",
    "click .js-videoplayer-hd.hd-off"  : "_hdOn",

It seems like, to me, that the _hdOff event fires regardless of whether the hd-on class or the hd-off class are applied.

assigning @iceberg901, would like to pair this. I just spent more time than I was planning on tracing all the event weirdness, it seems weird to me that we have two events setup like this rather than one _hdToggle event

iceberg901 commented 12 years ago

Here's the issue:

The code only switches between the following playback qualities: 'large' and 'default'

  1. So, the only time the button will do anything is if the user gets an HD quality video by default when their Youtube video loads. In this case, they can appropriately use the button to disable and then re-enable HD.
  2. For anyone else (seemingly all of us), the button will come up showing HD dark, and if they click it, nothing will happen.

So, for case 2, we need to detect when the video STARTS playing in a resolution other than HD. When this happens, the HD button should be removed from the interface, since it will be useless and confusing.

If at some later time a Youtube video starts playing in HD, we can make the button visible again.

Helpful hints can be found here:

https://developers.google.com/youtube/iframe_api_reference#Playback_quality

Downgrading priority since this isn't a killer.