0

I am creating a Chromecast app that streams video and uses out of stream VTT captions. I have successfully managed to load TTML but I require to load VTT also for this I have the following code

this.player.enableCaptions(true, 'vtt', 'http://some_file.vtt');

this fails within the MediaPlayer.js with tyhe following error

Uncaught TypeError: Cannot read property 'parse' of null

This looks to be in the code to load the individual cues has anyone come across this problem?

4

2 回答 2

0
this.player.enableCaptions(true, 'vtt', 'http://some_file.vtt');

应该

this.player.enableCaptions(true, 'webvtt', 'http://some_file.vtt');
于 2017-02-06T14:36:12.640 回答
0

您需要将(文本/音频)轨道信息添加到您的 MediaInfo,然后设置活动轨道。看看这个指南。另请注意,即使您的媒体是 mp4,拥有曲目也需要 CORS。

于 2016-07-04T21:01:46.030 回答