From c334bfd04149de7da80256da1e46fe93720aa5e0 Mon Sep 17 00:00:00 2001 From: Moshe Maor Date: Thu, 23 May 2024 11:59:46 +0300 Subject: [PATCH] FEC-13956: Add window before MediaSource (#774) ### Description of the Changes Please add a detailed description of the change, whether it's an enhancement or a bugfix. If the PR is related to an open issue please link to it. ### CheckLists - [ ] changes have been done against master branch, and PR does not conflict - [ ] new unit / functional tests have been added (whenever applicable) - [ ] test are passing in local environment - [ ] Travis tests are passing (or test results are not worse than on master branch :)) - [ ] Docs have been updated --- src/engines/html5/media-source/base-media-source-adapter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engines/html5/media-source/base-media-source-adapter.ts b/src/engines/html5/media-source/base-media-source-adapter.ts index 07b6a43a..4daa98b5 100644 --- a/src/engines/html5/media-source/base-media-source-adapter.ts +++ b/src/engines/html5/media-source/base-media-source-adapter.ts @@ -101,7 +101,7 @@ export default class BaseMediaSourceAdapter extends FakeEventTarget implements I public static isMSESupported(): boolean { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore - const mediaSource = MediaSource || window.WebKitMediaSource; + const mediaSource = window.MediaSource || window.WebKitMediaSource; // isTypeSupported isn't exist or not a function for old MSE implementation return !!mediaSource && typeof mediaSource.isTypeSupported === 'function'; }