Skip to content

Commit

Permalink
Merge pull request #701 from dayvson/master
Browse files Browse the repository at this point in the history
Fix localstorage volume settings bug (fixes #677)
  • Loading branch information
flavioribeiro committed Nov 30, 2015
2 parents e8360da + 4344de5 commit 7cd9d47
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 7cd9d47

Please sign in to comment.