Im playing a video from youtube on my site and want to be able to use these captions at my domain. JW player documentation about captions can be found here:
Now here's the problem: JW player's built in translation support looks like this:
tracks: [{
file: "/assets/captions-en.vtt",
label: "English",
kind: "captions",
"default": true
},{
file: "/assets/captions-fr.vtt",
kind: "captions",
label: "French"
}]
It uses a physical path to search for .vtt files.
My question is simply:
How do i fetch captions from a youtube video and display them in JW player?