Re:ShowHN: Generate your own MTV (Last.fm+Youtube)
by pierrefar on Sunday October 24, 2010 @10:24AM
(#1826163)
Conceptually, I can think of two classes of solutions:
1. Put the overlay only over the part of the player you really want to catch the clicks for. It sounds you want it only for the play/pause so it might work. You'd need to calculate or guess where these controls are actually on the screen.
2. Detect whether the player is loaded and only if it is do you insert the overlay or enable the click event for it. This solution has a nice side effect of being able to tell the user they need flash enabled for yrou app to work.
Re:ShowHN: Generate your own MTV (Last.fm+Youtube)
by JonathanBouman on Sunday October 24, 2010 @10:50AM
(#1826216)
I like 2.! It's on the todo list, great idea.
Re:ShowHN: Generate your own MTV (Last.fm+Youtube)
by andrewf on Sunday October 24, 2010 @11:17AM
(#1826287)
I get a window.alert that says the player can't be found - maybe in that case you should assume Flash is blocked/missing and remove the DIV for a few seconds so repeated clicking has an effect.
For now a (dirty) fix, you can reach the flash video object itself by (right mouse)clicking on the Youtube logo.