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

player ready or not?

I have the following code:

player.onReady = function() {

which displays "undefined", I can't figure out how to run some when the player is actually ready.

How can I do that?

Thanks in advance


1 Community Answers


JW Player Support Agent  
0 rated :

What version of the player are you using? The following code returns “idle” for me in 7.3.5:

<div id="myElement">Loading the player…</div> <script type="text/javascript"> var player = jwplayer("myElement"); player.setup({ file: "video.mp4", image: 'image.jpg' }); player.onReady = function() { console.log(player.getState()); } </script>

This question has received the maximum number of answers.