Skip to content

Commit

Permalink
DO NOT MERGE: fix temporarily dev branch issues
Browse files Browse the repository at this point in the history
  • Loading branch information
peaBerberian committed Dec 27, 2024
1 parent 0b916a8 commit 51c2b4a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/compat/browser_detection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ let isA1KStb40xx = false;
isPanasonic = true;
} else if (navigator.userAgent.indexOf("Xbox") !== -1) {
isXbox = true;
} else if (navigator.userAgent.indexOf("Model/a1-kstb40xx")) {
} else if (navigator.userAgent.indexOf("Model/a1-kstb40xx") !== -1) {
isA1KStb40xx = true;
}
})();
Expand Down
3 changes: 3 additions & 0 deletions src/main_thread/decrypt/__tests__/find_key_system.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ describe("find_key_systems - ", () => {
it("should create a media key the first time and then reuse the previous one if it's the same configuration", async () => {
requestMediaKeySystemAccessMock.mockImplementation(() => {
return {
keySystem: "com.widevine.alpha",
createMediaKeys: () => ({
createSession: () => ({
// eslint-disable-next-line @typescript-eslint/no-empty-function
Expand Down Expand Up @@ -218,6 +219,7 @@ describe("find_key_systems - ", () => {
it("should create a media key the first time and then create another one if the previous is not compatible.", async () => {
requestMediaKeySystemAccessMock.mockImplementation(() => {
return {
keySystem: "com.widevine.alpha",
createMediaKeys: () => ({
createSession: () => ({
// eslint-disable-next-line @typescript-eslint/no-empty-function
Expand Down Expand Up @@ -278,6 +280,7 @@ describe("find_key_systems - ", () => {
it("should create a media key the first time and then reuse the previous one if it's a different configuration but it's a compatible configuration.", async () => {
requestMediaKeySystemAccessMock.mockImplementation(() => {
return {
keySystem: "com.widevine.alpha",
createMediaKeys: () => ({
createSession: () => ({
// eslint-disable-next-line @typescript-eslint/no-empty-function
Expand Down
4 changes: 2 additions & 2 deletions src/main_thread/decrypt/find_key_system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ export default function getMediaKeySystemAccess(
currentState !== null &&
!shouldRenewMediaKeySystemAccess() &&
// TODO: Do it with MediaKeySystemAccess.prototype.keySystem instead?
keyType === currentState.keySystemOptions.type &&
keyType === currentState.mediaKeySystemAccess.keySystem &&
eme.implementation === currentState.emeImplementation.implementation &&
isNewMediaKeySystemConfigurationCompatibleWithPreviousOne(
keySystemConfiguration,
Expand All @@ -495,7 +495,7 @@ export default function getMediaKeySystemAccess(
value: {
mediaKeySystemAccess: currentState.mediaKeySystemAccess,
askedConfiguration: currentState.askedConfiguration,
options: currentState.keySystemOptions,
options: keySystemOptions,
codecSupport: extractCodecSupportListFromConfiguration(
currentState.askedConfiguration,
currentState.mediaKeySystemAccess.getConfiguration(),
Expand Down

0 comments on commit 51c2b4a

Please sign in to comment.