1

I'm trying to build a WebVTT metronome and I'm specifying the cues with millisecond precision for both the start and end times. Unfortunately, it is showing up inconsistently in different browsers. Some of the beats start late, some are missed, and some overlap with the next one.

I believe it is a browser rounding error as VTTCue.startTime and VTTCue.endTime are stored by seconds as a double.

What's weird is that it only works in native Firefox video viewer, which my guess is due to it's special way of handling floats also described here.

I've even tried doing it in Video.js and had the same issues (even in Firefox).

It's all bizarre to me, since my understanding is that JS numbers are supposed to be 8 bytes long.

This is my sample WebVTT and environment

The beats should be consistently spaced.

Kemal Ahmed
  • 638
  • 6
  • 15
  • [There's a cue sync issue that has been open for a while](https://bugs.chromium.org/p/chromium/issues/detail?id=576310), but that doesn't explain the issue in Safari – Kemal Ahmed Apr 20 '19 at 20:48

0 Answers0