mirror of
https://github.com/Floriansylvain/musee-illusion-mobile.git
synced 2026-08-19 11:43:17 +02:00
fix: event listeners to audio element
This commit is contained in:
@@ -24,7 +24,13 @@ const toggleAudio = () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<audio preload="auto" ref="audioRef" :src="props.src"></audio>
|
<audio
|
||||||
|
preload="auto"
|
||||||
|
ref="audioRef"
|
||||||
|
:src="props.src"
|
||||||
|
@playing="isPlaying = true"
|
||||||
|
@pause="isPlaying = false"
|
||||||
|
></audio>
|
||||||
<article class="audio-guide">
|
<article class="audio-guide">
|
||||||
<button type="button" @click="toggleAudio">
|
<button type="button" @click="toggleAudio">
|
||||||
<ion-icon :icon="isPlaying ? pauseIcon : playIcon"></ion-icon>
|
<ion-icon :icon="isPlaying ? pauseIcon : playIcon"></ion-icon>
|
||||||
|
|||||||
Reference in New Issue
Block a user