control the sound card from the browser

Status
Not open for further replies.

mcuk2000

New member
May 26, 2008
201
1
0
London, UK - NYC, US
here is the issue:
In one of my page I push ringtones, and I offer a preview of about 10secs on the songs. The previews are pulled from an external source and I got no control over them, as the player is embedded in an iframe.

I need to find a way to get a control when the music starts exactly, and in that moment display a banner. Is there any way I can find a way around it? like some control over the audio card, the audio out etc etc...
 


As far as I know you can't interface with hardware through the standard flash plugin. But flash really isn't my thing, so maybe a guru knows differently. So that probably rules out using flash. Probably the same with Java.

So as far as I know you'd have to have the user install something, which is probably not desirable.

What I would try to do is see if I could find the position of the play button, assuming there is one.

You might have to find the x offset of the iframe and add it to the offset of the play button from the left margin of the iframe, which hopefully is fixed and constant, and then listen for the mouse event.

I'm not sure if the event in the iframe will bubble up to the parent, but I think it will. You'd probably just attach the event to the iframe and the handler would sniff out the coordinates where the mouse was clicked and then you figure out if mousex >= startx && mousex <= endx && mousey >= starty && mousey <= endy.
 
Status
Not open for further replies.