Skip to content

Commit

Permalink
Fix localstorage volume settings bug (fixes #677)
Browse files Browse the repository at this point in the history
  • Loading branch information
dayvson committed Nov 28, 2015
1 parent a33f866 commit 4344de5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/media_control/media_control.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ export default class MediaControl extends UIObject {
onVolumeChanged(event) {
this.mute = (this.currentVolume === 0)
this.setVolumeLevel(event)
this.persistConfig && Config.persist("volume", event)
}

changeTogglePlay() {
Expand Down Expand Up @@ -291,9 +292,7 @@ export default class MediaControl extends UIObject {
setVolume(value) {
this.currentVolume = Math.min(100, Math.max(value, 0))
this.container.setVolume(this.currentVolume)
this.setVolumeLevel(this.currentVolume)
this.mute = (this.currentVolume === 0)
this.persistConfig && Config.persist("volume", this.currentVolume)
this.onVolumeChanged(this.currentVolume)
}

toggleFullscreen() {
Expand Down

0 comments on commit 4344de5

Please sign in to comment.