-
Notifications
You must be signed in to change notification settings - Fork 426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebVTT captions not rendering at all #982
Comments
👋 Thanks for opening your first issue here! 👋 If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. |
Just wanted to stop by and see if there is any other information I can provide to make debugging this easier. I've been trying out the latest VideoJS 7.10.3 release, which includes http-streaming 2.3.0 but so far the issue persists. In the meantime, we're able to fallback to use sideloaded caption files. Thanks in advance. |
Looks like for whatever reason the startTime and endTime come out as |
I looked into it a bit and figured out the problem. It's because there's a space after the comma in the webvtt header. It's probably something we should fix but if you remove the space it'll start working again.
BROKEN:
|
Thanks, @gkatsev ! I didn't think to check extra whitespaces. I'll give this a shot in the morning and update this ticket. |
You're welcome. It's a tricky thing to find. I ended up stepping through the code and then noticed that it was searching for |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@gkatsev, we happened to hit a blocker on our player that can be resolved by addressing this particular issue. I pushed a simple fix to trim the whitespace from the parsed keys over in videojs/vtt.js#60 and was hoping someone might be able to take a look. Thanks in advance. |
Description
We are experiencing issues with not being able to render captions in our web player. Our HLS manifests reference a WebVTT file that the VideoJS player is able to download but I think something breaks during parsing. When we go to turn our captions on, an error shows up:
Uncaught TypeError: Failed to construct 'VTTCue': The provided double value is non-finite.
This leads us to find that in the player’s text tracks, startTime is showing up asNaN
. This error appears to be getting thrown by theVTTSegmentLoader
(handleSegment_
case):http-streaming
) player with our HLS stream and the captions didn’t work even in the most basic of examples.Steps to reproduce
Results
Expected
Error output
Uncaught TypeError: Failed to construct 'VTTCue': The provided double value is non-finite.
The stacktrace for this error points to VTTSegmentLoader's
handleSegment_
switch case, particularly the following loop:Additional Information
videojs-http-streaming version
videojs-http-streaming "1.13.2" and "2.2.3"
videojs version
video.js 7.8.4 and video.js 7.10.1
Browsers
Platforms
Other Plugins
Other JavaScript
The text was updated successfully, but these errors were encountered: