Skip to content

Commit

Permalink
chore(platform): add a method to check for Amazon Fire TV platform
Browse files Browse the repository at this point in the history
  • Loading branch information
subhanahmed047 committed Jul 26, 2022
1 parent bca2c9e commit ed73d4b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/util/platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,16 @@ shaka.util.Platform = class {
return shaka.util.Platform.userAgentContains_('PlayStation 4');
}

/**
* Check if the current platform is Amazon Fire TV.
* https://developer.amazon.com/docs/fire-tv/identify-amazon-fire-tv-devices.html
*
* @return {boolean}
*/
static isAmazonFireTV() {
return shaka.util.Platform.userAgentContains_('AFT');
}

/**
* Returns a major version number for Safari, or Safari-based iOS browsers.
*
Expand Down

0 comments on commit ed73d4b

Please sign in to comment.