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: Support for XOne devices #7529

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
Draft

Conversation

Iragne
Copy link
Contributor

@Iragne Iragne commented Oct 31, 2024

Close #7522

@Iragne
Copy link
Contributor Author

Iragne commented Oct 31, 2024

Still testing it

@avelad avelad added type: enhancement New feature or request platform: TV/STB Issues affecting smart TV or set-top box platforms priority: P4 Nice to have / wishful thinking labels Oct 31, 2024
@avelad avelad added this to the v4.12 milestone Oct 31, 2024
@shaka-bot
Copy link
Collaborator

shaka-bot commented Oct 31, 2024

Incremental code coverage: 81.82%

lib/util/platform.js Outdated Show resolved Hide resolved
*/
static isXOne() {
let rdk = false;
if (window && Object.keys(window).includes('ServiceManager')) {
Copy link
Member

@joeyparrish joeyparrish Nov 1, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: TV/STB Issues affecting smart TV or set-top box platforms priority: P4 Nice to have / wishful thinking type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Xone Support
4 participants