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

Jwplayer Track WebVTT File Error


Hey guys so I have this problem placing in captions into my video.

I'm placing my .vtt as a value inside my object but it seems like the browser doesn't like the way it was output. I'm following this guide here

This is the Error that pops up on my console


{name: "", message: "Converting circular structure to JSON", error: TypeError: Converting circular structure to JSON at Object.stringify (native) at Object.<ano…}


**captions-en.vtt**

00:00:01.000 --> 00:00:15.000
What brings you to the land
of the gatekeepers?

00:00:15.500 --> 00:00:20.500
I'm searching for someone.

00:00:36.500 --> 00:00:39.000
A dangerous quest for a lone hunter.

00:00:41.500 --> 00:00:44.000
I've been alone for as long
as I can remember.


**Javascript**

jwplayer("my-video").setup({
file: "<my-video-file>",
width: "100%",
aspectratio: "24:10",
primary: "flash",
tracks: [{
file: "/assets/captions/captions-en.vtt",
label: "English",
kind: "captions"
}]
});


I also made sure I saved as "UTF-8" encoding.

Am I missing something from this tutorial?
https://support.jwplayer.com/customer/en/portal/articles/1407438-adding-closed-captions

1 Community Answers

Alex

JW Player Support Agent  
0 rated :

Hi there,

Do you have “WEBVTT” (without quotes) at the beginning of your VTT file, followed by a blank line? Using your captions as an example, your VTT file should look like this:

WEBVTT

00:00:01.000 --> 00:00:15.000
What brings you to the land
of the gatekeepers?

00:00:15.500 --> 00:00:20.500
I'm searching for someone.

00:00:36.500 --> 00:00:39.000
A dangerous quest for a lone hunter.

00:00:41.500 --> 00:00:44.000
I've been alone for as long
as I can remember.

You can also paste the contents of your captions file into the Live WebVTT Validator to make sure your captions adhere to the WebVTT spec. If they do ad here to the spec, can you provide a URL to a reproduction page showing the issue?

Thank you.

This question has received the maximum number of answers.