
Unable to show captions from Youtube
Hi Im trying to retrieve captions from Youtube. I've managed to retrieve the actual file and converted it into .vtt format.
http://video.google.com/timedtext?lang=sv&v=jFRj5uH3Jhc&fmt=vtt
The file is still hosted on Youtubes domain, along with the video.
How do i implement it in my JW player on MY domain?
Here's my code:
jwplayer.key = "myKey";
jwplayer('div-id').setup({
playlist: [{
'file': 'https://www.youtube.com/watch?v=jFRj5uH3Jhc',
'image': '/myimagefile',
'width': '100%',
'controlbar': 'bottom',
'primary': 'flash',
tracks: [
{
file: 'http://video.google.com/timedtext?lang=sv&v=jFRj5uH3Jhc&fmt=vtt',
label: 'Swedish',
kind: 'captions',
"default": true
}
],
'aspectratio': '16:9',
wmode: 'transparent'
}]
});
I've tried without the surrounding playlist {[ ]} option, also tried without both 'controlbar': 'bottom',
& 'primary': 'flash',. Havent got it to work once. What am i doing wrong?
Thanks in advance /Carl