videojs / video.js

Video.js - open source HTML5 video player
https://videojs.com
Other
37.95k stars 7.44k forks source link

CR delimited VTT files not supported #8367

Open mlitwin opened 1 year ago

mlitwin commented 1 year ago

Description

VTT files with carriage return (CR \r) line endings are rejected by the parser with a ParsingError.Errors.BadSignature error from the underlying parser library. Per https://www.w3.org/TR/webvtt1/#webvtt-line-terminator "A single U+000D CARRIAGE RETURN (CR) character." should be supported.

See https://github.com/videojs/vtt.js/issues/64 for details and diagnosis.

Reduced test case

https://mlitwin.github.io/videojs-CR-bug/

Steps to reproduce

  1. Play the video
  2. Note no caption ("Caption") visible in in the default CR.vtt track
  3. Switch to the CRLF.vtt track, differing from CR.vtt only in line endings, and note that the caption appears.

Errors

No response

What version of Video.js are you using?

8.3.0

Video.js plugins used.

No response

What browser(s) including version(s) does this occur with?

Version 114.0.5735.198 (Official Build) (x86_64)

What OS(es) and version(s) does this occur with?

macOS 13.3.1 (a)

welcome[bot] commented 1 year ago

👋 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. To help make it easier for us to investigate your issue, please follow the contributing guidelines.