Merge branch 'removed-autoplay' into 'develop'
Removed autoplay on page reload See merge request funkwhale/funkwhale!43
This commit is contained in:
commit
0944ef2a07
|
@ -7,6 +7,7 @@ Changelog
|
||||||
|
|
||||||
- Front: added some unittests for the store (#55)
|
- Front: added some unittests for the store (#55)
|
||||||
- Front: fixed broken login redirection when 401
|
- Front: fixed broken login redirection when 401
|
||||||
|
- Front: Removed autoplay on page reload
|
||||||
|
|
||||||
|
|
||||||
0.3.5 (2018-01-07)
|
0.3.5 (2018-01-07)
|
||||||
|
|
|
@ -59,13 +59,15 @@ export default {
|
||||||
|
|
||||||
},
|
},
|
||||||
loaded: function () {
|
loaded: function () {
|
||||||
if (this.isCurrent && this.autoplay) {
|
if (this.isCurrent) {
|
||||||
this.$store.commit('player/duration', this.$refs.audio.duration)
|
this.$store.commit('player/duration', this.$refs.audio.duration)
|
||||||
if (this.startTime) {
|
if (this.startTime) {
|
||||||
this.setCurrentTime(this.startTime)
|
this.setCurrentTime(this.startTime)
|
||||||
}
|
}
|
||||||
this.$store.commit('player/playing', true)
|
if (this.autoplay) {
|
||||||
this.$refs.audio.play()
|
this.$store.commit('player/playing', true)
|
||||||
|
this.$refs.audio.play()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateProgress: function () {
|
updateProgress: function () {
|
||||||
|
|
|
@ -37,7 +37,6 @@ export default new Vuex.Store({
|
||||||
key: 'player',
|
key: 'player',
|
||||||
paths: [
|
paths: [
|
||||||
'player.looping',
|
'player.looping',
|
||||||
'player.playing',
|
|
||||||
'player.volume',
|
'player.volume',
|
||||||
'player.duration',
|
'player.duration',
|
||||||
'player.errored'],
|
'player.errored'],
|
||||||
|
@ -45,21 +44,6 @@ export default new Vuex.Store({
|
||||||
return mutation.type.startsWith('player/') && mutation.type !== 'player/currentTime'
|
return mutation.type.startsWith('player/') && mutation.type !== 'player/currentTime'
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
createPersistedState({
|
|
||||||
key: 'progress',
|
|
||||||
paths: ['player.currentTime'],
|
|
||||||
filter: (mutation) => {
|
|
||||||
let delay = 10
|
|
||||||
return mutation.type === 'player/currentTime' && parseInt(mutation.payload) % delay === 0
|
|
||||||
},
|
|
||||||
reducer: (state) => {
|
|
||||||
return {
|
|
||||||
player: {
|
|
||||||
currentTime: state.player.currentTime
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
createPersistedState({
|
createPersistedState({
|
||||||
key: 'queue',
|
key: 'queue',
|
||||||
filter: (mutation) => {
|
filter: (mutation) => {
|
||||||
|
|
Loading…
Reference in New Issue