Quantcast
Channel: support.jwplayer.com :: Streaming
Viewing all articles
Browse latest Browse all 2800

Track list as javascript variable

$
0
0
Hi All, Firstly, I am using JW6, and trying to build a player using all JS variables. I am able to pass the stream url and placeholder image successfully, but I cannot get subtitles to work. I am able to generate the JSON string correctly, this is the content of the variable "substring": [{"file":"http://server.com/subtitles/english.srt","label":"English","kind":"captions"}] And I generate the player like so: jwplayer('player').setup({ file: durl, tracks: substring, image: bgurl, width: '100%', aspectratio: "16:9", androidhls: 'true', stretching: 'uniform', autostart: 'true', skin: 'glow' }); But, when playback starts, there is no "CC" button If I paste the actual string into the "tracks" line, all works fine, the CC button shows up and the subtitle files are loaded correctly Is this possible at all, or am I missing something?

Viewing all articles
Browse latest Browse all 2800

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>