Skip to content

Commit 62dce4a

Browse files
authored
fix(Offline): Fix persistent session removal (#8895)
Fixes #8882 Regression introduced in #8828
1 parent a8af2c2 commit 62dce4a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/drm/drm_engine.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ shaka.drm.DrmEngine = class {
308308
* @param {!Array<MediaKeySystemMediaCapability>} videoCapabilities
309309
* @return {!Promise}
310310
*/
311-
initForRemoval(keySystem, licenseServerUri, serverCertificate,
311+
async initForRemoval(keySystem, licenseServerUri, serverCertificate,
312312
audioCapabilities, videoCapabilities) {
313313
const mimeTypes = [];
314314
if (videoCapabilities.length) {
@@ -336,6 +336,12 @@ shaka.drm.DrmEngine = class {
336336
const drmInfo = makeDrmInfo(audioCapabilities[0].encryptionScheme || '');
337337
variant.audio.drmInfos.push(drmInfo);
338338
}
339+
// We should get the decodingInfo results for the variants after we filling
340+
// in the drm infos, and before queryMediaKeys_().
341+
await shaka.util.StreamUtils.getDecodingInfosForVariants([variant],
342+
/* usePersistentLicenses= */ true, this.srcEquals_,
343+
/* preferredKeySystems= */ []);
344+
this.destroyer_.ensureNotDestroyed();
339345
return this.queryMediaKeys_(/* variants= */ [variant]);
340346
}
341347

0 commit comments

Comments
 (0)