Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Do not recognize MultiChoice & Ziggo as Apple #7996

Merged
merged 2 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions lib/util/platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,13 +307,15 @@ shaka.util.Platform = class {
!shaka.util.Platform.isTizen() &&
!shaka.util.Platform.isEOS() &&
!shaka.util.Platform.isAPL() &&
!shaka.util.Platform.isAPP() &&
!shaka.util.Platform.isVirginMedia() &&
!shaka.util.Platform.isOrange() &&
!shaka.util.Platform.isPS4() &&
!shaka.util.Platform.isAmazonFireTV() &&
!shaka.util.Platform.isComcastX1() &&
!shaka.util.Platform.isZenterio() &&
!shaka.util.Platform.isSkyQ();
!shaka.util.Platform.isSkyQ() &&
!shaka.util.Platform.isMultiChoice();
}

/**
Expand Down Expand Up @@ -396,6 +398,16 @@ shaka.util.Platform = class {
return shaka.util.Platform.userAgentContains_('DT_STB_BCM');
}

/**
* Check if the current platform is a MultiChoice STB.
* @return {boolean}
*/
static isMultiChoice() {
// cspell: ignore MDMP
return shaka.util.Platform.userAgentContains_('MDMP1001S') ||
shaka.util.Platform.userAgentContains_('PS5525IMC');
}

/**
* Returns a major version number for Safari, or Safari-based iOS browsers.
*
Expand Down Expand Up @@ -461,6 +473,14 @@ shaka.util.Platform = class {
return shaka.util.Platform.userAgentContains_('PC=APL');
}

/**
* Check if the current platform is an APPSTB set-top box.
* @return {boolean}
*/
static isAPP() {
return shaka.util.Platform.userAgentContains_('PC=APPSTB');
}

/**
* Guesses if the platform is a mobile one (iOS or Android).
*
Expand Down Expand Up @@ -568,7 +588,8 @@ shaka.util.Platform = class {
Platform.isEOS() || Platform.isAPL() ||
Platform.isVirginMedia() || Platform.isOrange() ||
Platform.isComcastX1() || Platform.isChromecast() ||
Platform.isHisense() || Platform.isZenterio()) {
Platform.isHisense() || Platform.isZenterio() ||
Platform.isAPP() || Platform.isMultiChoice()) {
return true;
}
return false;
Expand Down
1 change: 1 addition & 0 deletions project-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ linksource
longname

# 3rd party
APPSTB
Bitcodin
Brightcove
Broadpeak
Expand Down