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

onTime() event not working in m3u8 live stream


Hi

I am trying to execute onTime() event in HLS m3u8 live streaming but its not working. I am using jwplayer version 6.8 and also upgrade it to 6.12
please help!

3 Community Answers

Randy

JW Player Support Agent  
0 rated :

Hello,

Could you please provide a bit more detail about the issue, a link would be a good starting point.

Kindly,
Randy

info

User  
0 rated :

Same here. Player kept spinning

Randy

JW Player Support Agent  
0 rated :

Hello,

I may have a possible workaround for you. Please try the following code and see if this works for you:

<script type="text/javascript" language="javascript"> jwplayer("player").setup({ file: "http://wowza.jwplayer.com:1935/live/jelly.stream/playlist.m3u8" }); function startTimer(state){ if(state === "playing"){ playing(); } else { paused(); } }; var c = 0; var t; function playing() { c = c + 1; console.log(c); t = setTimeout(function(){playing()}, 1000); } function paused() { clearTimeout(t); } var played = false; jwplayer().onPlay(function(){ if (played === false){ startTimer("playing"); played = true; } }); jwplayer().onPause(function(){ played = false; startTimer("paused"); }); jwplayer().onIdle(function(){ played = false; startTimer("paused"); }); </script>

Kindly,
Randy

This question has received the maximum number of answers.