Plugin doesn't work with a VTT files using windows line endings
Opened this issue · 3 comments
Using windows line endings \r\n in the VTT file causes the plugin to not parse correctly. Either the documentation should be updated to specify that only UNIX line endings "\n" or "\r" are supported or the split regex data.split(/[\r\n][\r\n]/i);
should be modified to support \r\n line endings.
I could send a PR for the data.split regex if you are open to it.
Changing the processVtt method to look for \r\n first using (\r\n){2}
and then if none are found, using the current regex should work while still being backward compatible.
This module sucks I can't believe this is 'the best videojs has to offer' in terms of vtt sprite support
You're right @k-harker
https://www.w3.org/TR/webvtt1/#webvtt-line-terminator
A WebVTT line terminator consists of one of the following:
A U+000D CARRIAGE RETURN U+000A LINE FEED (CRLF) character pair.
A single U+000A LINE FEED (LF) character.
A single U+000D CARRIAGE RETURN (CR) character.
@mayeaux please...