Jan. 06, 2009John Murfett
I've read a few threads here and found that someone else was having a similar problem, with playerReady not working locally.
I can't find any reference to whether addModelListener should work locally.
I'm using
player = document.getElementById('playerID');
player.addModelListener("STATE", "stateListener");
My code is fine, it runs on a webserver okay, but unfortunately that's not how I want to use the script.
Locally it just gives me the error "player.addModelListener is not a function"
Is there any workaround for this, or any alternative of adding a listener in a script run locally?
Thanks!
Jan. 06, 2009Rich Local
Due to Adobe Flash Player security restrictions, browser JavaScript sandboxing, etc., the JavaScript API isn't functional offline.
Oct. 21, 2009Geoff
I cant get playerReady() to fire OR get addModelListener to work. addModelListener 'is not a function'.
I'm so goddamned frustrated with this POS. ALL I WANT IS TO CHECK IF THE DAMNED THING IS PLAYING OR NOT.
Oct. 23, 2009Zachary Ozer
You'll need to wait for playerReady before you can add the listener, ie
try {
var myReady = playerReady;
} catch (err){
}
playerReady = function(obj) {
// Insert your code here
player = document.getElementById('playerID');
player.addModelListener("STATE", "stateListener");
try {
myReady(obj);
} catch (err){
}
}
Here are some helpful links to learn more about the JW Player™:
Earn money with ads from LongTail's AdSolution. Watch our demos and sign up now!
If you don’t buy a commercial license, you cannot use a JW Player™ on (i) a site that has ads; (ii) a corporate site; or a (iii) CMS. Our licenses are very inexpensive, so what are you waiting for? Buy a license today.