Skip to content

Commit

Permalink
player expand hack update
Browse files Browse the repository at this point in the history
  • Loading branch information
Digital authored and Digital committed Apr 29, 2024
1 parent a822017 commit 771eaaa
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions v2/src/components/VNewPersistentPlayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -485,19 +485,15 @@ const toggleExpanded = async (e) => {
// hack for the audio player to not pause when the player is appended to the expanded player and back.
const delay = e ? 255 : 490
if (isPlaying.value) {
clearTimeout(timeOutPlay)
timeOutPlay = setTimeout(() => {
$mediaPlayerRef.value?.play()
}, delay + 2)
}
clearTimeout(timeOutMove)
timeOutMove = setTimeout(() => {
timeOutMove = setTimeout(async () => {
if (e) {
expandedPlayerLocationRef.value.appendChild($mediaPlayerRef.value)
} else {
defaultPlayerLocationRef.value.appendChild($mediaPlayerRef.value)
}
await nextTick()
isPlaying.value ? $mediaPlayerRef.value?.play() : null
}, delay)
}
Expand Down

0 comments on commit 771eaaa

Please sign in to comment.