-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: Support for XOne devices #7529
base: main
Are you sure you want to change the base?
Conversation
Still testing it |
Incremental code coverage: 81.82% |
*/ | ||
static isXOne() { | ||
let rdk = false; | ||
if (window && Object.keys(window).includes('ServiceManager')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this simpler version work instead?
if (window.ServiceManager && window.ServiceManager.getServiceForJavaScript &&
navigator.platform.includes('Linux aarch64') &&
shaka.util.Platform.userAgentContains_('AppleWebKit') &&
shaka.util.Platform.userAgentContains_('Version/8.0')) {
You will need to add a file following the example of externs/xbox.js
to satisfy the compiler that ServiceManager
and getServiceForJavaScript
might exist. The types can be very simple if you don't need to call into any of that functionality.
Close #7522