mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 06:59:24 +02:00
added shortcuts for play, volume and restore
This commit is contained in:
parent
ee1449bdd0
commit
03f15ada4e
4 changed files with 25 additions and 3 deletions
|
@ -86,6 +86,8 @@ class Queue {
|
|||
cache.remove('queue')
|
||||
}
|
||||
setVolume (newValue) {
|
||||
newValue = Math.min(newValue, 1)
|
||||
newValue = Math.max(newValue, 0)
|
||||
this.state.volume = newValue
|
||||
if (this.audio.setVolume) {
|
||||
this.audio.setVolume(newValue)
|
||||
|
@ -94,7 +96,9 @@ class Queue {
|
|||
}
|
||||
cache.set('volume', newValue)
|
||||
}
|
||||
|
||||
incrementVolume (value) {
|
||||
this.setVolume(this.state.volume + value)
|
||||
}
|
||||
reorder (oldIndex, newIndex) {
|
||||
// called when the user uses drag / drop to reorder
|
||||
// tracks in queue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue