Hi all,
i want to use subtitle in moon.Video, but must be download subtitle file to TV local and then set track attribute to show,
how to streaming subtitle file not downloading,
another question: how to get temporary directory path in webOS SmartTV by enyojs?
Thank you very much.
0 ·
Comments
rendered: function () {
this.inherited(arguments);
var video=this.$.player.getVideo().node;
var track = document.createElement("track");
track.srclang="en";
track.label="English subtitle";
track.src="http://192.168.64.5/test/sample.vtt";
video.appendChild(track);
t=video.textTracks[0];
t.mode="showing";
}
It looks like WebOS only supports webvtt subtitles, not srt. So I had to edit (insert WEBVTT text into the first line) or convert my srt file to display it.
Only webvtt format works, you need to edit or convert to webvtt.
One drawback is, that if there are internal subtitles in the file, the first is displayed also.
I haven't tried media fragments yet.
many thanks.
Here are the instructions how to do it:
http://developer.lge.com/webOSTV/sdk/web-sdk/webos-tv-cli/debugging-web-applications-cli
Or try to paste your code here, maybe someone spot an error.