Skip to content

Commit

Permalink
fix: APL set-top box wrongly identifies as an Apple device. (#6026)
Browse files Browse the repository at this point in the history
  • Loading branch information
Viktor Vasylkovskyi committed Jan 8, 2024
1 parent f52dd2b commit 7f5005d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/util/platform.js
Expand Up @@ -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() &&
Expand Down Expand Up @@ -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).
*
Expand Down

0 comments on commit 7f5005d

Please sign in to comment.