Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: requestId init tag #1518

Merged
merged 1 commit into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/media-segment-request.js
Original file line number Diff line number Diff line change
Expand Up @@ -852,10 +852,6 @@ const waitForCompletion = ({
segment.endOfAllRequests = Date.now();
if (segment.map && segment.map.encryptedBytes && !segment.map.bytes) {
triggerSegmentEventFn({ type: 'segmentdecryptionstart', segment });
// add -init to the "id" to differentiate between segment
// and init segment decryption, just in case they happen
// at the same time at some point in the future.
segment.requestId += '-init';
return decrypt({ decryptionWorker,
// add -init to the "id" to differentiate between segment
// and init segment decryption, just in case they happen
Expand Down
4 changes: 3 additions & 1 deletion test/media-segment-request.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,8 @@ QUnit.test('init segment with key has bytes decrypted', function(assert) {
bytes: new Uint32Array([0, 0, 0, 1])
}
}
}
},
requestId: 'foo.bar.id'
},
trackInfoFn(segment, _trackInfo) {
trackInfo = _trackInfo;
Expand All @@ -779,6 +780,7 @@ QUnit.test('init segment with key has bytes decrypted', function(assert) {
16,
'key bytes are readable'
);
assert.equal(segmentData.requestId, 'foo.bar.id', 'requestId is expected value');

// verify stats
assert.equal(segmentData.stats.bytesReceived, 6198, '6198 bytes');
Expand Down
Loading