From 7f5005db23e2f280cee9b695d5d6432e0d402024 Mon Sep 17 00:00:00 2001 From: Viktor Vasylkovskyi Date: Mon, 8 Jan 2024 10:50:11 +0000 Subject: [PATCH] fix: APL set-top box wrongly identifies as an Apple device. (#6026) --- lib/util/platform.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/util/platform.js b/lib/util/platform.js index 9bcc88dc12..bd09e9f73a 100644 --- a/lib/util/platform.js +++ b/lib/util/platform.js @@ -234,6 +234,7 @@ shaka.util.Platform = class { return !!navigator.vendor && navigator.vendor.includes('Apple') && !shaka.util.Platform.isTizen() && !shaka.util.Platform.isEOS() && + !shaka.util.Platform.isAPL() && !shaka.util.Platform.isVirginMedia() && !shaka.util.Platform.isOrange() && !shaka.util.Platform.isPS4() && @@ -357,6 +358,15 @@ shaka.util.Platform = class { return shaka.util.Platform.userAgentContains_('PC=EOS'); } + /** + * Check if the current platform is an APL set-top box. + * + * @return {boolean} + */ + static isAPL() { + return shaka.util.Platform.userAgentContains_('PC=APL'); + } + /** * Guesses if the platform is a mobile one (iOS or Android). *