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?

Deviland
  • 3,324
  • 7
  • 32
  • 53

2 Answers2

0

You need to add the (text/audio) track(s) information to your MediaInfo and then set the active track. Take a look at this guide. Also be aware that having tracks, even when your media is mp4, would require CORS.

Ali Naddaf
  • 16,951
  • 2
  • 21
  • 28
0
this.player.enableCaptions(true, 'vtt', 'http://some_file.vtt');

should be

this.player.enableCaptions(true, 'webvtt', 'http://some_file.vtt');
Deviland
  • 3,324
  • 7
  • 32
  • 53