Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Georg Abenthung
funkwhale
Commits
0d3df8ab
Verified
Commit
0d3df8ab
authored
Dec 26, 2019
by
Eliot Berriot
Browse files
Fix #970: short audio glitch when switching switching to another track with player paused
parent
7c8b592f
Changes
4
Hide whitespace changes
Inline
Side-by-side
changes/changelog.d/970.bugfix
0 → 100644
View file @
0d3df8ab
Fixed short audio glitch when switching switching to another track with player paused (#970)
front/src/components/audio/Player.vue
View file @
0d3df8ab
...
...
@@ -361,7 +361,7 @@ export default {
self
.
ended
()
},
onunlock
:
function
()
{
if
(
self
.
$store
.
state
.
player
.
playing
)
{
if
(
self
.
$store
.
state
.
player
.
playing
&&
self
.
sound
)
{
self
.
soundId
=
self
.
sound
.
play
(
self
.
soundId
)
}
},
...
...
@@ -581,13 +581,11 @@ export default {
}
this
.
currentSound
=
this
.
getSound
(
trackData
)
this
.
$store
.
commit
(
'
player/isLoadingAudio
'
,
true
)
if
(
this
.
playing
)
{
this
.
soundId
=
this
.
currentSound
.
play
()
this
.
$store
.
commit
(
'
player/errored
'
,
false
)
this
.
$store
.
commit
(
'
player/playing
'
,
true
)
this
.
$store
.
dispatch
(
'
player/updateProgress
'
,
0
)
this
.
observeProgress
(
true
)
}
this
.
soundId
=
this
.
currentSound
.
play
()
this
.
$store
.
commit
(
'
player/errored
'
,
false
)
this
.
$store
.
commit
(
'
player/playing
'
,
true
)
this
.
$store
.
dispatch
(
'
player/updateProgress
'
,
0
)
this
.
observeProgress
(
true
)
}
},
toggleMobilePlayer
()
{
...
...
front/src/store/queue.js
View file @
0d3df8ab
...
...
@@ -140,7 +140,6 @@ export default {
currentIndex
({
commit
,
state
,
rootState
,
dispatch
},
index
)
{
commit
(
'
ended
'
,
false
)
commit
(
'
player/currentTime
'
,
0
,
{
root
:
true
})
commit
(
'
player/playing
'
,
true
,
{
root
:
true
})
commit
(
'
currentIndex
'
,
index
)
if
(
state
.
tracks
.
length
-
index
<=
2
&&
rootState
.
radios
.
running
)
{
dispatch
(
'
radios/populateQueue
'
,
null
,
{
root
:
true
})
...
...
front/tests/unit/specs/store/queue.spec.js
View file @
0d3df8ab
...
...
@@ -226,7 +226,6 @@ describe('store/queue', () => {
expectedMutations
:
[
{
type
:
'
ended
'
,
payload
:
false
},
{
type
:
'
player/currentTime
'
,
payload
:
0
,
options
:
{
root
:
true
}
},
{
type
:
'
player/playing
'
,
payload
:
true
,
options
:
{
root
:
true
}
},
{
type
:
'
currentIndex
'
,
payload
:
1
}
]
})
...
...
@@ -239,7 +238,6 @@ describe('store/queue', () => {
expectedMutations
:
[
{
type
:
'
ended
'
,
payload
:
false
},
{
type
:
'
player/currentTime
'
,
payload
:
0
,
options
:
{
root
:
true
}
},
{
type
:
'
player/playing
'
,
payload
:
true
,
options
:
{
root
:
true
}
},
{
type
:
'
currentIndex
'
,
payload
:
1
}
]
})
...
...
@@ -252,7 +250,6 @@ describe('store/queue', () => {
expectedMutations
:
[
{
type
:
'
ended
'
,
payload
:
false
},
{
type
:
'
player/currentTime
'
,
payload
:
0
,
options
:
{
root
:
true
}
},
{
type
:
'
player/playing
'
,
payload
:
true
,
options
:
{
root
:
true
}
},
{
type
:
'
currentIndex
'
,
payload
:
1
}
],
expectedActions
:
[
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment