Skip to content

🎥 Make videos programmatically with React

Update parse-webm-header.ts

Jonny Burgerc67996a07479
diff --git a/packages/video-parser/src/boxes/webm/parse-webm-header.ts b/packages/video-parser/src/boxes/webm/parse-webm-header.ts
index 2b1616b6fe..c65835e8d2 100644
--- a/packages/video-parser/src/boxes/webm/parse-webm-header.ts
+++ b/packages/video-parser/src/boxes/webm/parse-webm-header.ts
@@ -3,7 +3,8 @@ import {expectSegment} from './segments';
// Parsing according to https://darkcoding.net/software/reading-mediarecorders-webm-opus-output/
export const parseWebm = (data: ArrayBuffer) => {
- const counter = getArrayBufferIterator(data, 4);
+ const counter = getArrayBufferIterator(data, 0);
+ counter.discard(4);
const length = counter.getEBML();
if (length !== 31) {