vtt.js: Safari 10.1 throws Error: The provided value is non-finite

When using vtt.js in Safari it throws Error: The provided value is non-finite on this part cue.line = settings.get("line", "auto");.

I think this is an issue in the Safari VTTCue implementation, but I hope to find a workaround in this polyfill.

Below the stacktrace:

consumeCueSettings@http://localhost:9000/bower_components/vtt.js/lib/vtt.js:269:10
parseCue@http://localhost:9000/bower_components/vtt.js/lib/vtt.js:303:23
parse@http://localhost:9000/bower_components/vtt.js/lib/vtt.js:1268:23
  • macOS Sierra 10.12.4
  • Safari Version 10.1 (12603.1.30.0.34)

About this issue

  • Original URL
  • State: open
  • Created 7 years ago
  • Comments: 16 (2 by maintainers)

Commits related to this issue

Most upvoted comments

Just waiting for the pr to be merged.

Here’s what we do in jwplayer:

var line = settings.get('line', 'auto');
if (line === 'auto' && defaults.line === -1) {
    // set numeric line number for Safari
    line = -1;
}
cue.line = line;

my PR should fix it