From d67c2a143d1893987cdf51c8b0ba6d25f7703093 Mon Sep 17 00:00:00 2001 From: zhanhong Date: Mon, 12 May 2025 13:48:47 +0800 Subject: [PATCH] fix: improve MediaSource and ManagedMediaSource detection method --- src/core/mse-controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/mse-controller.js b/src/core/mse-controller.js index c6846b3..7e82a5a 100644 --- a/src/core/mse-controller.js +++ b/src/core/mse-controller.js @@ -48,7 +48,7 @@ class MSEController { }; // Use ManagedMediaSource only if w3c MediaSource is not available (e.g. iOS Safari) - this._useManagedMediaSource = ('ManagedMediaSource' in self) && !('MediaSource' in self); + this._useManagedMediaSource = (typeof self.ManagedMediaSource === 'function') && !(typeof self.MediaSource === 'function'); this._mediaSource = null; this._mediaSourceObjectURL = null;