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: add Amazon Fire TV platform support #4375

Merged

Conversation

subhanahmed047
Copy link
Contributor

The isBrowserSupported function in the utils/player.js fails if the Safari Version is < 13. However, this check doesn't work for Amazon Fire TV devices. Even tho they have a Version/4.0 in the user agent string, the browser still supports all other requirements to support playback with Shaka Player.

Here are a couple of examples of the different FireTV device user agents:

Fire TV Stick 4K - 1st Gen:

'Mozilla/5.0 (Linux; Android 7.1.2; AFTMM Build/NS6289; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/100.0.4896.127 Mobile Safari/537.36'

Fire TV Stick - 3rd Gen:

'Mozilla/5.0 (Linux; Android 9; AFTSSS Build/PS7285.2877N; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/96.0.4664.92 Mobile Safari/537.36'

The fix involves identifying the Amazon Fire TV device based on the parameters described in the Amazon Fire TV docs and disabling the Safari version check for these devices.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to
    not work as expected)
  • This change requires a documentation update

Checklist:

  • I have signed the Google CLA https://cla.developers.google.com/
  • My code follows the style guidelines of this project
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have verified my change on multiple browsers on different platforms (Amazon FireTV Stick 4k, and non-4k device)
  • I have run ./build/all.py and the build passes
  • I have run ./build/test.py and all tests pass (while most tests pass, some tests around TextDisplayer are failing even on the main branch for Edge and Firefox, even tho those tests seem irrelevant to the changes in this PR). I'll create an issue around that.

@joeyparrish joeyparrish changed the title chore: add Amazon Fire TV platform support feat: add Amazon Fire TV platform support Jul 26, 2022
@joeyparrish
Copy link
Member

Renamed to "feat:" since this is adding functionality. Will review shortly.

lib/player.js Outdated Show resolved Hide resolved
@subhanahmed047 subhanahmed047 force-pushed the chore_add_amazon_firetv_platform branch from cef116a to 1ad9c82 Compare July 27, 2022 00:00
@joeyparrish joeyparrish merged commit 5102dac into shaka-project:main Jul 28, 2022
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Jul 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants