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

onTime broken + onPause not firing with HLS live stream, work fine with RTMP live stream


We are using jwplayer 6.12, and just noticed that with HLS live stream, the onTime event doesn't work as expected while the onPause event doesn't fire at all. Both work fine with RTMP live stream.

With the latter, the onTime event would fire once every 0.1 second, with event.position that increments from 0, and event.duration as undefined.

With the former, the onTime event would only fire once every time the state changes to playing, with event.position as 0, and event.duration as undefined.

We found a similar bug posted in http://support.jwplayer.com/customer/portal/questions/11513565-ontime-event-not-working-in-m3u8-live-stream, with a workaround from Randy. However, as onPause doesn't fire at all, I don't think it will work either.

We would like to track how long a live stream is being watched by the user, and we may have to resort to using onMeta instead, which feels rather dirty.

1 Community Answers

Cooper Reid

JW Player Support Agent  
0 rated :

I just tested locally, and I see that onPause is working as expected. Do you have a page that demonstrates onPause failing for live HLS streams? onTime will not work, as there is no static time associated with a livestream position. onTime is only fired at the beginning of the video and returns position `0`.
-Cooper

This question has received the maximum number of answers.