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

Seek Code Example?


Using JW Player 7.1.4 with Wowza Streaming Engine 4.3.

Looking for a solution that uses an API call to seek backward -30 seconds from the live playback position when streaming Wowza DVR content via HLS. Ideally, a simple URL in the player or an HTML hyperlink (preferred) that 'onclick' will grab the current position time and seek back 30 seconds. Doesn't have to be exact.

Wish list: WIth multiple players in a page, use the same command to kick all the players back using the same interval.

This is the code I am using now:

<script type="text/javascript">// <![CDATA[
        file: '',
        image: 'images/wowza_poster.jpg',
        width: '426',
height: '240',
        aspectratio: '16:9',
        primary: 'flash',
skin: 'jwplayer/bekle.xml',
autostart: 'true'
// ]]></script>

<a href="#" onclick="jwplayer('player1').seek(1730);jwplayer('player2').stop();jwplayer('player3').stop();jwplayer('player4').stop();jwplayer('player5').stop();jwplayer('player6').stop();jwplayer('player7').stop();jwplayer('player8').stop();">

Comments welcome.

Thank you!


1 Community Answers


JW Player Support Agent  
0 rated :

I do not have a live DVR stream to test with at the moment, but I did check that the following code seeked (sought?) back 30 seconds on an VOD HLS stream:


But with a live DVR stream, the math is a little different. Since seek(0) will take you to the current live time, seek(-30) should do what you need.

As for stopping all the other players on the page, what you have is sufficient. Please see for more details on the getPosition() and seek() events.

This question has received the maximum number of answers.