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

Seeking with Embedded Player and Hosted Videos


Hello,

I am attempting to post two videos that I have uploaded to BOTR. Both videos are on the same page and are contained within different Bootstrap tabs. I have created a custom player for them and have embedded the provided script into my page.

For each video I have a short list of "Chapter Markers" that have the seconds into the video the player should seek. I have bound the click event to the markers through jQuery and when I was hosting the player and video locally everything worked with the seek. However, now that I have switched to the embedded, I can not seem to get the seek attempts to work.

How should I use the player API and correctly reference each player instance when calling seek while using the embedded player with hosted video?

I understood the function was to work like so:
jwplayer(player_id).seek(120);

Right now the videos do play, the seek just doesn't work.

Thanks!

5 Community Answers

Remco van Bree

JW Player Support Agent  
0 rated :

Do you have a link to where you tried to set this up?

jwplayer(0) can be used to address the first player on the page, jwplayer(1) to control the second etc. etc. too.

JW Player

User  
0 rated :

Thank you very much for the reply. I tried the approach you suggested and it unfortunately did not work.

I dug around the embedded script that was provided and got the seek to work on flash enabled browsers. Here is what I found and the code that I am using, (the site is behind a client's password protected area so the link wont help)

My page has two of these in it:
bc.. <script type="text/javascript" src="http://content.bitsontherun.com/players/xxxxxxx1-yyyyyyy1.js"></script>


and
bc.. <script type="text/javascript" src="http://content.bitsontherun.com/players/xxxxxxx2-yyyyyyy2.js"></script>


In the two above embedded script references I found the lines:
bc.. try {
jwplayer.api.addPlayer(new jwplayer.api.PlayerAPI('botr_xxxxxxxx_yyyyyyyy_swf'));
} catch (err) { /* In case people use BOTR + JW Embedder. */ }



If I do:
bc.. jwplayer('botr_xxxxxxx1_yyyyyyy1_swf').seek(seconds);

or
bc.. jwplayer('botr_xxxxxxx2_yyyyyyy2_swf').seek(seconds);

Then everything works great, but only in Flash and not in HTML5.

In HTML5/non-flash, I get a null error when attempting to call the seek function.

Thank you again for any input you can provide.

Remco van Bree

JW Player Support Agent  
0 rated :

Right now the players do not have a JavaScript API, we expect to be able to release an update that allows you to upgrade BotR players to JW Player 6.3 with JavaScript API next week.

JW Player

User  
0 rated :

Congrats for JW Player 6, also javascript:self.parent.player.sendEvent('SEEK', xx) doesn't work with JW Player 6. Please have a look at http://presentationtube.net/watch/?v=0NzWTKLZ5cq. It works fine with Playr 5, but the upgraded version doesn't work.

JeroenW

JW Player Support Agent  
0 rated :

Thanks! And correct, our Flash-only JavaScript API using playerReady() does not work anymore with JW6.

Instead, you should use our new (and much more extensive) unified JavaScript API:

http://www.longtailvideo.com/support/jw-player/28850/using-the-javascript-api

Note a seeking function in this API looks like this:

jwplayer().seek(123);

This question has received the maximum number of answers.