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

Range parameters in URL


Hello,

is it somehow possible to configure new JW Player 7 to use start and end parameters in URL instead of using byte range request? When you want to stream 30 seconds of mp4 video starting at 60 second in JW Player 5, JW Player 5 will add start and end parameters in seconds to request URL (for example http://server.com/video/1.mp4?start=60&end=90) and it will not use byte range like JW Player 7. Is it possible to configure JW Player 7 so JW Player 7 would handle the request in the same way as JW Player 5 - without using byte range with start and end parameters in URL?

Thanks

1 Community Answers

Todd

JW Player Support Agent  
0 rated :

We do not have built-in functionality for such URL parameters, but you could certainly implement them on your side with the following steps:

1) Pass the URL with the start and end parameters
2) Parse out the values for each parameter in your Javascript before you call jwplayer().setup()
3) For the start param, add that value to an .once(‘play’) function so it only fires the first time the viewer presses play:

jwplayer().once('play',function(){
  jwplayer().seek(your_start_time_here);
})

4) End time is a little trickier to implement because you have to listen to the time and act when the current time is greater than the desired end time:

jwplayer().on('time',function(){
  if (jwplayer().getPosition >= your_end_time_here)
    jwplayer().stop();
})

This question has received the maximum number of answers.