From ac1d54c822a34a149c4344a987a751b748031aa8 Mon Sep 17 00:00:00 2001 From: Paul Berberian Date: Mon, 12 Aug 2024 14:04:01 +0200 Subject: [PATCH] Revert "fix(safari): video not starting because key are never considered usable for a track" This reverts commit 48c255de048a2978cd24d3f34207cb19f034eda3. --- src/main_thread/decrypt/content_decryptor.ts | 29 +------------------ .../init/directfile_content_initializer.ts | 1 - .../init/media_source_content_initializer.ts | 1 - .../init/multi_thread_content_initializer.ts | 4 +-- .../utils/initialize_content_decryption.ts | 4 +-- 5 files changed, 3 insertions(+), 36 deletions(-) diff --git a/src/main_thread/decrypt/content_decryptor.ts b/src/main_thread/decrypt/content_decryptor.ts index e6ef8f3b85..3780383b03 100644 --- a/src/main_thread/decrypt/content_decryptor.ts +++ b/src/main_thread/decrypt/content_decryptor.ts @@ -15,7 +15,6 @@ */ import type { IMediaElement } from "../../compat/browser_compatibility_types"; -import { isSafariDesktop } from "../../compat/browser_detection"; import type { ICustomMediaKeys, ICustomMediaKeySystemAccess } from "../../compat/eme"; import eme, { getInitData } from "../../compat/eme"; import config from "../../config"; @@ -59,10 +58,6 @@ import { } from "./utils/key_id_comparison"; import type KeySessionRecord from "./utils/key_session_record"; -export interface IContext { - isDirectFile: boolean; -} - /** * Module communicating with the Content Decryption Module (or CDM) to be able * to decrypt contents. @@ -136,10 +131,6 @@ export default class ContentDecryptor extends EventEmitter( { initializationState: { type: "uninitialized", value: null }, diff --git a/src/main_thread/init/utils/initialize_content_decryption.ts b/src/main_thread/init/utils/initialize_content_decryption.ts index c08ea4cd4e..a4659946c0 100644 --- a/src/main_thread/init/utils/initialize_content_decryption.ts +++ b/src/main_thread/init/utils/initialize_content_decryption.ts @@ -10,7 +10,6 @@ import type { CancellationSignal } from "../../../utils/task_canceller"; import { ContentDecryptorState } from "../../decrypt"; import type IContentDecryptor from "../../decrypt"; import type { IProcessedProtectionData } from "../../decrypt"; -import type { IContext } from "../../decrypt/content_decryptor"; /** * Initialize content decryption capabilities on the given `HTMLMediaElement`. @@ -47,7 +46,6 @@ export default function initializeContentDecryption( }) => void; onCodecSupportUpdate?: () => void; }, - context: IContext, cancelSignal: CancellationSignal, ): { statusRef: IReadOnlySharedReference; @@ -84,7 +82,7 @@ export default function initializeContentDecryption( } log.debug("Init: Creating ContentDecryptor"); - const contentDecryptor = new ContentDecryptor(mediaElement, keySystems, context); + const contentDecryptor = new ContentDecryptor(mediaElement, keySystems); const onStateChange = (state: ContentDecryptorState) => { if (state > ContentDecryptorState.Initializing) {