Skip to content

Commit

Permalink
Fix: Always polyfill MediaCapabilities for Apple browsers (shaka-proj…
Browse files Browse the repository at this point in the history
  • Loading branch information
Álvaro Velad Galván authored Aug 21, 2021
1 parent 6a03207 commit 4dce1e0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/polyfill/media_capabilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@ shaka.polyfill.MediaCapabilities = class {
// Since MediaCapabilities is not fully supported on Chromecast yet, we
// should always install polyfill for Chromecast.
// TODO: re-evaluate MediaCapabilities in the future versions of Chromecast.
if (!shaka.util.Platform.isChromecast() && navigator.mediaCapabilities) {
// Since MediaCapabilities implementation is buggy in Apple browsers, we
// should always install polyfill for Apple browsers.
// See: https://github.com/google/shaka-player/issues/3530
// TODO: re-evaluate MediaCapabilities in the future versions of Apple
// Browsers.
if (!shaka.util.Platform.isChromecast() &&
!shaka.util.Platform.isApple() &&
navigator.mediaCapabilities) {
shaka.log.debug(
'MediaCapabilities: Native mediaCapabilities support found.');
return;
Expand Down

0 comments on commit 4dce1e0

Please sign in to comment.