Chromecast VTT未显示
问题描述:
我正在创建一个用于流式传输视频并使用流式VTT字幕的Chromecast应用程序。我已经成功地管理加载TTML,但我需要还加载VTT为了这个,我有以下代码Chromecast VTT未显示
this.player.enableCaptions(true, 'vtt', 'http://some_file.vtt');
失败的MediaPlayer.js内的tyhe以下错误
Uncaught TypeError: Cannot read property 'parse' of null
这看起来是在加载单个线索的代码中有没有人遇到过这个问题?
答
this.player.enableCaptions(true, 'vtt', 'http://some_file.vtt');
应该
this.player.enableCaptions(true, 'webvtt', 'http://some_file.vtt');
VTT应该已经WebVTT插入 – Deviland