Skip to content

Commit f3898e5

Browse files
committed
Fix uuid box in mp4box.js
1 parent 65bba90 commit f3898e5

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

chrome/player/VideoSource.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ const headerBlacklist = [
1919
'connection',
2020
'dnt',
2121
'cookie',
22+
'sec-fetch-storage-access',
23+
'sec-fetch-user',
24+
'upgrade-insecure-requests',
2225
];
2326

2427

chrome/player/modules/mp4box.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5499,7 +5499,11 @@ BoxParser.Box.prototype.writeHeader = function (stream, msg) {
54995499
}
55005500
stream.writeString(this.type, null, 4);
55015501
if (this.type === "uuid") {
5502-
stream.writeUint8Array(this.uuid);
5502+
const uuidBytes = new Uint8Array(16);
5503+
for (let i = 0; i < 16; i++) {
5504+
uuidBytes[i] = parseInt(this.uuid.substring(i * 2, i * 2 + 2), 16);
5505+
}
5506+
stream.writeUint8Array(uuidBytes);
55035507
}
55045508
if (this.size > MAX_SIZE) {
55055509
stream.writeUint64(this.size);

0 commit comments

Comments
 (0)