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

Adding subtitles to my video on my website


Ok, som here's my code:
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<script src="//content.jwplatform.com/players/iD48kqB6-dfdnz2US.js"></script>
<script>
var playerInstance = jwplayer("myElement")
playerInstance.setup({
tracks: [{
file: "/public_html/Subtitles/Die.Welle.Aka.The.Wave.2008.720p.BluRay.x264.anoXmous_eng.vtt",
label: "English",
kind: "captions",
"default": true
}
}]
});
</script>

</body>
</html>

And I want to add subtitles to my video, but the video shows but not the subtitles... Where can I add the subtitles? I've searched for an answer the whole day and I need to finish this very simple website as fast as possible... And also I want to add 2 kinds of languages of subtitles... Please help me ASAP

3 Community Answers

Todd

JW Player Support Agent  
0 rated :

If you are using the single-line embed from your account dashboard, you need to use the dashboard to add the captions track to the video. This means you will need to upload the video to us first if you have not already done so.

The other option would be to not use the single-line embed and add the entire player configuration onto your page as documented at https://support.jwplayer.com/customer/en/portal/articles/1407438-adding-closed-captions

For two language captions tracks, you would add a second entry to your tracks: [] block:

tracks: [{ 
  file: "/public_html/Subtitles/Die.Welle.Aka.The.Wave.2008.720p.BluRay.x264.anoXmous_eng.vtt", 
  label: "English",
  kind: "captions",
  "default": true 
},{ 
  file: "/public_html/Subtitles/Die.Welle.Aka.The.Wave.2008.720p.BluRay.x264.anoXmous_esp.vtt", 
  label: "Español",
  kind: "captions",
}]

Todd

JW Player Support Agent  
1 rated :

Hi Allison,

I guess it would it be a feature request to allow someone to be able to define an external captions track in their dashboard, similar to the way you can add an external video URL and external ad tag.

Thanks,
Todd

sigadarry

User  
0 rated :

Liquid error: undefined method `gsub' for nil:NilClass

This question has received the maximum number of answers.