I do not see how thus question is related to the swfobject library. You
might be better oiff asking this in the Youtube forums.

Aran


On Thu, Jan 19, 2012 at 2:40 PM, Casim <[email protected]> wrote:

> While building my new killer app, I run into an strange problem with
> player instantiation:
>
> - The ready player instances do not pass any info about *which* player
> triggered the onStateChange -handler (even 'callee.caller' and 'this'
> are of no use).
>
> - addEventListener does not allow one to set any parameters for the
> onStateChange -handler. This handler is set when the player instance
> triggers onYouTubePlayerReady, and accepts a string name of the
> handler function.
>
> currently the app gets the handle to the player and sets event
> listeners like:
>
> function jmx.players.onPlayerReady(id) {
>  jmx.vmap[id].yplr = document.getElementById(id);
>  jmx.vmap[id].yplr.addEventListener("onStateChange",
> "jmx.players.stateChange")
> }
>
> How on earth to get *both* state *and* identity of the player that
> triggers onStateChange?
>
> Defining a custom handler function with hardcoded id for each player
> seems rather weird, but is that my only option?
>
> Thanks,
> Cas
>
> --
> You received this message because you are subscribed to the Google Groups
> "SWFObject" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/swfobject?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"SWFObject" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/swfobject?hl=en.

Reply via email to