Skip to content

Commit

Permalink
fix: Fix MediaCapabilities polyfill on Hisense (#4927)
Browse files Browse the repository at this point in the history
fixes #4925
  • Loading branch information
avelad authored and joeyparrish committed Jan 30, 2023
1 parent 166d7cd commit 5317329
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/polyfill/media_capabilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ shaka.polyfill.MediaCapabilities = class {
!shaka.util.Platform.isWebOS() &&
!shaka.util.Platform.isTizen() &&
!shaka.util.Platform.isEOS() &&
!shaka.util.Platform.isHisense() &&
navigator.mediaCapabilities) {
shaka.log.info(
'MediaCapabilities: Native mediaCapabilities support found.');
Expand Down
8 changes: 8 additions & 0 deletions lib/util/platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,14 @@ shaka.util.Platform = class {
return shaka.util.Platform.userAgentContains_('PlayStation 4');
}

/**
* Check if the current platform is Hisense.
*/
static isHisense() {
return shaka.util.Platform.userAgentContains_('Hisense') ||
shaka.util.Platform.userAgentContains_('VIDAA');
}

/**
* Check if the current platform is Virgin Media device.
*/
Expand Down

0 comments on commit 5317329

Please sign in to comment.