Skip to content

Commit

Permalink
Only set persistent-license sessionTypes when persistence license are…
Browse files Browse the repository at this point in the history
… wanted
  • Loading branch information
peaBerberian committed Jan 10, 2025
1 parent aea9093 commit c76324a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ describe("decrypt - global tests - media key system access", () => {
return {
...conf,
persistentState: "required",
sessionTypes: ["temporary", "persistent-license"],
sessionTypes: ["persistent-license"],
};
});
expect(mockRequestMediaKeySystemAccess).toHaveBeenNthCalledWith(
Expand Down Expand Up @@ -913,15 +913,15 @@ describe("decrypt - global tests - media key system access", () => {
return {
...conf,
persistentState: "required",
sessionTypes: ["temporary", "persistent-license"],
sessionTypes: ["persistent-license"],
};
});
const expectedPersistentConfig: MediaKeySystemConfiguration[] = defaultKSConfig.map(
(conf) => {
return {
...conf,
persistentState: "required",
sessionTypes: ["temporary", "persistent-license"],
sessionTypes: ["persistent-license"],
};
},
);
Expand Down Expand Up @@ -1019,7 +1019,7 @@ describe("decrypt - global tests - media key system access", () => {
return {
...conf,
persistentState: "required",
sessionTypes: ["temporary", "persistent-license"],
sessionTypes: ["persistent-license"],
};
});
expect(mockRequestMediaKeySystemAccess).toHaveBeenCalledTimes(2);
Expand Down Expand Up @@ -1066,7 +1066,7 @@ describe("decrypt - global tests - media key system access", () => {
return {
...conf,
persistentState: "required",
sessionTypes: ["temporary", "persistent-license"],
sessionTypes: ["persistent-license"],
};
},
);
Expand All @@ -1075,7 +1075,7 @@ describe("decrypt - global tests - media key system access", () => {
return {
...conf,
persistentState: "required",
sessionTypes: ["temporary", "persistent-license"],
sessionTypes: ["persistent-license"],
};
});
const expectedIdentifierConfig: MediaKeySystemConfiguration[] = defaultKSConfig.map(
Expand Down Expand Up @@ -1172,7 +1172,7 @@ describe("decrypt - global tests - media key system access", () => {
return {
...conf,
persistentState: "required",
sessionTypes: ["temporary", "persistent-license"],
sessionTypes: ["persistent-license"],
};
});
expect(mockRequestMediaKeySystemAccess).toHaveBeenCalledTimes(2);
Expand Down
3 changes: 1 addition & 2 deletions src/main_thread/decrypt/find_key_system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,7 @@ function buildKeySystemConfigurations(
}
} else if (!isNullOrUndefined(keySystem.persistentLicenseConfig)) {
persistentState = "required";
// TODO: shouldn't it be just `["persistent-license"]` here?
sessionTypes = ["temporary", "persistent-license"];
sessionTypes = ["persistent-license"];
} else {
sessionTypes = ["temporary"];
}
Expand Down

0 comments on commit c76324a

Please sign in to comment.