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.
Is there another step I'm missing. Like a parse method?
Also note that I'm streaming the video from AWS S3 Bucket. Would that be the reason causing the error that I would have to upload the vtt file on there?
The error is the same in this post but they showed how they did it by placing in a string. How would I go about it if it came from a vtt file?