From df79470af088089f8beba2f44a236593820d655a Mon Sep 17 00:00:00 2001 From: Agajan J Date: Wed, 9 Nov 2022 19:12:08 -0800 Subject: [PATCH] fix: 4676 - Virgin Media set top box is incorrectly categorized as Apple/Safari (#4678) In order to get the playback working, I am excluding VirginMedia device from isApple() platform test, otherwise it incorrectly fails at isBrowserSupported(). Fixes #4676 Co-authored-by: Casey Occhialini <1508707+littlespex@users.noreply.github.com> --- lib/util/platform.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/util/platform.js b/lib/util/platform.js index 7ba94d75dd..dffec9fb5a 100644 --- a/lib/util/platform.js +++ b/lib/util/platform.js @@ -213,6 +213,7 @@ shaka.util.Platform = class { return !!navigator.vendor && navigator.vendor.includes('Apple') && !shaka.util.Platform.isTizen() && !shaka.util.Platform.isEOS() && + !shaka.util.Platform.isVirginMedia() && !shaka.util.Platform.isPS4() && !shaka.util.Platform.isAmazonFireTV(); } @@ -237,6 +238,13 @@ shaka.util.Platform = class { return shaka.util.Platform.userAgentContains_('PlayStation 4'); } + /** + * Check if the current platform is Virgin Media device. + */ + static isVirginMedia() { + return shaka.util.Platform.userAgentContains_('VirginMedia'); + } + /** * Check if the current platform is Amazon Fire TV. * https://developer.amazon.com/docs/fire-tv/identify-amazon-fire-tv-devices.html