Skip to content

Commit

Permalink
CR update
Browse files Browse the repository at this point in the history
  • Loading branch information
gkatsev committed Nov 17, 2021
1 parent d0698d6 commit c9c8379
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/js/tech/html5.js
Original file line number Diff line number Diff line change
Expand Up @@ -1035,10 +1035,11 @@ Html5.canControlVolume = function() {

const canControl = volume !== Html5.TEST_VID.volume;

// on latest iOS, there are cases where we read the volume as changed.
// In those cases, we should add a timeout and check again later.
// Since features doesn't currently work asynchronously,
// we then have to manually set the new value.
// 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;
Expand Down

0 comments on commit c9c8379

Please sign in to comment.