You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we are using video.js and exoplayer for some devices to play our content and are using node-webvtt version "^1.9.4"
Our current .vtt files have a meta header that looks like this:
This is causing video.js and exoplayer to have issues loading captions due to an error with X-TIMESTAMP-MAP and the caption files are not being displayed.
Looking in the compiler.js, I noticed this section of code which deliberately adds a space to the output:
if (input.meta) {
if (typeof input.meta !== 'object' || Array.isArray(input.meta)) {
throw new CompilerError('Metadata must be an object');
}
Object.entries(input.meta).forEach((i) => {
if (typeof i[1] !== 'string') {
throw new CompilerError(`Metadata value for "${i[0]}" must be string`);
}
output += `${i[0]}: ${i[1]}\n`;
});
}
(https://github.com/osk/node-webvtt/blob/master/lib/compiler.js#L44)
And I am wondering what the reasoning is behind adding that space there in the output section?
Some players handle it correctly but not every player does and by removing that space both video.js and exoplayer were able to render the caption correctly and have it displayed.
Would it be possible to get this space removed in the meta if block?
The text was updated successfully, but these errors were encountered:
Currently we are using video.js and exoplayer for some devices to play our content and are using node-webvtt version "^1.9.4"
Our current .vtt files have a meta header that looks like this:
However after running our .vtt file through the compile() method, we are noticing that a space is being added after the semicolon in the meta header.
This is causing video.js and exoplayer to have issues loading captions due to an error with X-TIMESTAMP-MAP and the caption files are not being displayed.
Looking in the compiler.js, I noticed this section of code which deliberately adds a space to the output:
(https://github.com/osk/node-webvtt/blob/master/lib/compiler.js#L44)
And I am wondering what the reasoning is behind adding that space there in the output section?
Some players handle it correctly but not every player does and by removing that space both video.js and exoplayer were able to render the caption correctly and have it displayed.
Would it be possible to get this space removed in the meta if block?
The text was updated successfully, but these errors were encountered: