Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Revert "Avoid pausing audio when is loading" (#1685)

sarayourfriend7ff3dafb8c6d
diff --git a/src/components/VAudioTrack/VPlayPause.vue b/src/components/VAudioTrack/VPlayPause.vue
index fc030fa62..c953a1efe 100644
--- a/src/components/VAudioTrack/VPlayPause.vue
+++ b/src/components/VAudioTrack/VPlayPause.vue
@@ -89,7 +89,6 @@ export default defineComponent({
setup(props, { emit }) {
const isPlaying = computed(() => props.status === 'playing')
const isLoading = computed(() => props.status === 'loading')
- const isPaused = computed(() => props.status === 'paused')
/**
* Get the button label based on the current status of the player.
*/
@@ -110,13 +109,8 @@ export default defineComponent({
})
const handleClick = () => {
- if (isPlaying.value) {
- emit('toggle', 'paused')
- } else if (isPaused.value) {
- emit('toggle', 'playing')
- }
+ emit('toggle', isPlaying.value || isLoading.value ? 'paused' : 'playing')
}
-
return {
label,
icon,