diff --git a/src/js/tech/html5.js b/src/js/tech/html5.js index 7af947c3f2..94cd2bb8ac 100644 --- a/src/js/tech/html5.js +++ b/src/js/tech/html5.js @@ -1032,7 +1032,21 @@ Html5.canControlVolume = function() { const volume = Html5.TEST_VID.volume; Html5.TEST_VID.volume = (volume / 2) + 0.1; - return volume !== Html5.TEST_VID.volume; + + const canControl = volume !== Html5.TEST_VID.volume; + + // With the introduction of iOS 15, there are cases where the volume is read as + // changed but reverts back to its original state at the start of the next tick. + // To determine whether volume can be controlled on iOS, + // a timeout is set and the volume is checked asynchronously. + // Since `features` doesn't currently work asynchronously, the value is manually set. + if (canControl && browser.IS_IOS) { + window.setTimeout(() => { + Html5.prototype.featuresVolumeControl = volume !== Html5.TEST_VID.volume; + }); + } + + return canControl; } catch (e) { return false; }