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

Multiple kind: chapters


Hi!

Is it possible to have multiple chapters files ? Such has :

tracks:
[
{
file:'chapters-1.txt',
kind:'chapters'
},
file:'chapters-2.txt',
kind:'chapters'
]

If so, is it possible to click for instance a link, and decide which chapter file is going to load ?
For example, the default file is chapters-1.txt. Video starts to play. I click a link and chapters-2.txt loads while the video is still running.

Thanks!

4 Community Answers

Alex

JW Player Support Agent  
0 rated :

Hi, there.

My name is Alex and I am one of the Support Engineers at JW Player. I will be more than happy to assist you with your questions.

There is no built-in functionality that would allow to you to have multiple chapter tracks embedded. The only solution I can think of for you would be to have the following happen when someone chooses to change the chapters track:

1. Use .getPosition() to register the the current position of playback and assign it to a variable.
2. Use .load() to load a new playlist with the same video file, but different chapters track.
3. Use .play() to start playback of the content.
4. Listen for .on(‘play’) and with a callback to use .seek(x), where x is the variable that you assigned the value of .getPosition() to in step 1.

Please let me know if you need any more help or have any other questions.

Thank you!

RS

User  
0 rated :

Ok!
Thank you very much for your time, greatly appreciated!

Alex

JW Player Support Agent  
0 rated :

Not a problem.

Nabila Mehjabin

User  
0 rated :

Yes my problem is single link video watch

This question has received the maximum number of answers.