Skip to content

Commit

Permalink
fix: 4676 - Virgin Media set top box is incorrectly categorized as Ap…
Browse files Browse the repository at this point in the history
…ple/Safari (#4678)

In order to get the playback working, I am excluding VirginMedia device
from isApple() platform test, otherwise it incorrectly fails at
isBrowserSupported().

Fixes #4676

Co-authored-by: Casey Occhialini <1508707+littlespex@users.noreply.github.com>
  • Loading branch information
2 people authored and joeyparrish committed Dec 8, 2022
1 parent d60930e commit fe1c3d8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/util/platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ shaka.util.Platform = class {
return !!navigator.vendor && navigator.vendor.includes('Apple') &&
!shaka.util.Platform.isTizen() &&
!shaka.util.Platform.isEOS() &&
!shaka.util.Platform.isVirginMedia() &&
!shaka.util.Platform.isPS4() &&
!shaka.util.Platform.isAmazonFireTV();
}
Expand All @@ -237,6 +238,13 @@ shaka.util.Platform = class {
return shaka.util.Platform.userAgentContains_('PlayStation 4');
}

/**
* Check if the current platform is Virgin Media device.
*/
static isVirginMedia() {
return shaka.util.Platform.userAgentContains_('VirginMedia');
}

/**
* Check if the current platform is Amazon Fire TV.
* https://developer.amazon.com/docs/fire-tv/identify-amazon-fire-tv-devices.html
Expand Down

0 comments on commit fe1c3d8

Please sign in to comment.