feat: expose CEA708 window position in the cue's region (#5924)

CEA708 captions have positioning data available in their windows.
However, this isn't currently translated and exposed by shaka though it
is parsed from the bitstream.

Translates the windows into WebVTT regions and uses the mappings
outlined
https://dvcs.w3.org/hg/text-tracks/raw-file/default/608toVTT/608toVTT.html#positioning-in-cea-708

This is also partially implements #2583.
This commit is contained in:
Gary Katsevman
2023-11-23 11:19:46 -05:00
committed by GitHub
parent b75d9be5f5
commit 2a524bf51f
6 changed files with 346 additions and 37 deletions
+2 -1
View File
@@ -565,7 +565,8 @@ describe('CeaDecoder', () => {
decoder.extract(hideWindow, endTime);
const text = 'test';
const topLevelCue = new shaka.text.Cue(startTime, endTime, '');
const topLevelCue = CeaUtils.createWindowedCue(startTime, endTime, '',
serviceNumber, 0, 11, 11);
topLevelCue.nestedCues = [
CeaUtils.createDefaultCue(startTime, endTime, /* payload= */ text),
];