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 authored and joeyparrish committed Feb 17, 2024
1 parent 8f9fbb2 commit 2e8e2a4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/util/platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.isAPL() &&
!shaka.util.Platform.isVirginMedia() &&
!shaka.util.Platform.isOrange() &&
!shaka.util.Platform.isPS4() &&
Expand Down Expand Up @@ -336,6 +337,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 2e8e2a4

Please sign in to comment.