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

Trying to do the equivalent of HTML5 <video>'s "canplay" with JW Player, before playback starts

I'm working on a project to play a video with some time-synchronized audio files, using two instances of JW Player. So, for example, I have one MP3 audio file that I want to start playing at exactly 5.1 seconds into a video. (The video happens to be a YouTube video, but that's not really important).

If I load() the audio file into the audio JW player, it seems like it starts buffering the audio before I play() it; but, even so, there's a onBuffer() event (IDLE->BUFFERING), and then a BUFFERING->PLAY transition. I've caught onBufferFull() (I'm actually using v5.10 of JW Player -- I think the onBufferFull() event has been dropped in v6), but this just gets fired right as the audio starts to play.

I'd like a way to know if the audio is buffered enough to play _before_ I start it, and if not, I'll pause the video (as though the video was buffering) until the audio is ready. This is the equivalent of canplay, or canplaythrough, in the HTML5 video element. But I can't find any way to do this with JW Player. Am I missing something?

1 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

We do not have a canplay/canplaythrough equivalent.

This question has received the maximum number of answers.