You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the volume level is only persisted if you manually drag the volume slider, but does not persist if you mute/unmute so this leads to an inconsistent state where the persisted volume level does not match the volume slider's value.
// Store the last set volume as a local preference, if ls is supported
try{
globalThis.localStorage.setItem(
'media-chrome-pref-volume',
volume.toString()
);
}catch(err){
// ignore
}
Repro
Slide the volume slider all the way to zero and notice the media-chrome-pref-volume in local storage changes to 0 eventually as well
Tap the unmute icon and notice the volume slider is no longer set to 0
Look at the media-chrome-pref-volume key in local storage and notice it's still 0
Reload the player and see that the preferred volume is still muted even though the last time we unmuted it
Expected Behavior
Muting / unmuting should also update media-chrome-pref-volume in local storage, e.g. the volume slider changed value should always be persisted, regardless of which button (such as mute) is changing the volume.
The text was updated successfully, but these errors were encountered:
@iwasrobbed good callout! I think your intuition here is the right one for expected behavior. We'll try to get around to this ASAP, but we're also open to contributions if you'd like to knock it out. Sounds like you have a decent understanding of the codebase.
Issue
Currently, the volume level is only persisted if you manually drag the volume slider, but does not persist if you mute/unmute so this leads to an inconsistent state where the persisted volume level does not match the volume slider's value.
See
media-chrome/src/js/controller.js
Lines 569 to 598 in daa4b40
Repro
media-chrome-pref-volume
in local storage changes to 0 eventually as well0
media-chrome-pref-volume
key in local storage and notice it's still0
Expected Behavior
Muting / unmuting should also update
media-chrome-pref-volume
in local storage, e.g. the volume slider changed value should always be persisted, regardless of which button (such as mute) is changing the volume.The text was updated successfully, but these errors were encountered: