Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

AddModelListener not a function


Pretty new to the Jw player, I'm having an issue playing videos via android mobile. I'm getting a uncaught reference saying "player.AddModelListener is not a function". It looks like this function is suppose to set the state of the video, but maybe it isn't supported anymore? Any help is appreciated.

3 Community Answers

Heidi

JW Player Support Agent  
0 rated :

Could you provide some details about what you are trying to do? In the meantime, please take a look at the API documentation on our developer portal: https://developer.jwplayer.com/jw-player/docs/developer-guide/api/javascript_api_reference/

Brandon C

User  
0 rated :

Here is the code:
function addListeners() {
if (player) {
player.addModelListener("STATE", "stateListener");
} else {
setTimeout("addListeners()", 100);
}

}

It is trying to set the state of the video (completed or playing) but it seems the AddModeListener is not supported anymore. Is their an equivalent i can replace this with. I will look at the link provided thank you.

Heidi

JW Player Support Agent  
0 rated :

Brandon, please take a look at the documentation under “Playback” and let me know if you have further questions.

This question has received the maximum number of answers.