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

feat: EOS set-top box wrongly identifies as an Apple device. #4310

Merged
merged 3 commits into from
Jun 22, 2022
Merged
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
12 changes: 11 additions & 1 deletion lib/util/platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ shaka.util.Platform = class {
*/
static isApple() {
return !!navigator.vendor && navigator.vendor.includes('Apple') &&
!shaka.util.Platform.isTizen();
!shaka.util.Platform.isTizen() &&
!shaka.util.Platform.isEOS();
}

/**
Expand Down Expand Up @@ -260,6 +261,15 @@ shaka.util.Platform = class {
return !!shaka.util.Platform.safariVersion();
}

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

/**
* Guesses if the platform is a mobile one (iOS or Android).
*
Expand Down