catching "windows media player" object events
Reported by Clément Hallet | July 7th, 2008 @ 01:53 PM | in 1.6.1
Hi,
I found a particular bug using WMP objects driven by javascript.
Those kind of objects can generete dom events, for instance the "PlayStateChange" event when the stream is buffered, played ...
Contrary to all other IE events, it doesn't have the 'on' prefix.
This basic javascript code works fine:
$(player_id).attachEvent("PlayStateChange",function(newState){
Console.debug(newState)
}.bind(this));
But, since the "observe" method add a 'on' with IE, that prototype code doesn't work (the event is never catched) :
$(player_id).observe("PlayStateChange",function(newState){
console.debug(newState)
}.bind(this));
I can't figure what the solution could be, maybe by checking the element type (if its tag is "object") and don't add the 'on' ?
I have tested it with IE6 and IE7. I don't know what the behaviour would be with firefox and the WMP plugin.
Comments and changes to this ticket
-
-
John-David Dalton July 7th, 2008 @ 03:43 PM
- → Tag changed from events ie to events ie needs_patch needs_tests
- → State changed from new to bug
-
John-David Dalton July 8th, 2008 @ 02:30 PM
- → Milestone changed from to 1.6.1
- → Assigned user changed from to John-David Dalton
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
The Prototype JavaScript library.
