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

Showing Chapter titles throughout the timeline


Hello JWPlayer community,

My VTT file is setup like this:

Chapter 1
00:00:04.500 --> 00:00:14.500
Theorie

Chapter 2
00:00:14.500 --> 00:00:24.500
Stap 1

Chapter 3
00:00:24.500 --> 00:00:40.500
Stap 2

This way you only see the chapter name when you hover your mouse over the dots in the timeline. Is it possible to show the title of each chapter for the duration of the chapter instead of showing the timecodes in between?

4 Community Answers

George

JW Player Support Agent  
0 rated :

Could you please send me the test page that is having the issue?

jorisvdmark

User  
0 rated :

Hey George,
Here's an example:
http://test.jorisvandermark.com/Chapters/1.5/

I'd basicly like to turn the timecodes under the thumbnails to turn into chapter titles.

George

JW Player Support Agent  
1 rated :

Well I can suggest a hacky way of making a vtt for point for every second so something like this:

Chapter 1
00:00:04.500 —> 00:00:05.500
Theorie
Chapter 1
00:00:05.500 —> 00:00:06.500
Theorie
Chapter 1
00:00:06.500 —> 00:00:07.500
Theorie
..
Chapter 1
00:00:13.500 —> 00:00:14.500
Theorie

jherrieven

User  
1 rated :

Hi @jorisvdmark

Try adding the following after your setup code:

playerInstance.on('firstFrame', function(){
var tc= document.querySelectorAll('.jw-cue');
var prev_left = 100; for(var tcl = (tc.length-1);tcl>=0;tcl--){
var tcue = tc[tcl];
var cue_left = parseFloat(tcue.style.left);
var cue_width = (prev_left - cue_left);
tcue.style.width = cue_width+'%';
prev_left=cue_left;
tcue.style.backgroundColor="transparent";
tcue.style.height="20px";
tcue.style.marginTop="-8px";
tcue.style.borderLeft="1px solid #fff";tcue.style.borderRadius=0;
}
});

James Herrieven

===================================================
Powered by Haiku
http://powered-by-haiku.co.uk/
---------------------------------------------------
Tatami for Online Video
http://dev.powered-by-haiku.co.uk/solutions/tatami/
---------------------------------------------------
skype: JamesHerrieven
email: james[at]haiku[dot]co[dot]uk
===================================================

This question has received the maximum number of answers.