Support sending clap events at a specific time in audio mode

This commit is contained in:
N-Pex 2023-06-07 09:39:05 +02:00
parent 5f3f5d0afd
commit d5182395af
9 changed files with 149 additions and 21 deletions

View file

@ -22,6 +22,12 @@ export default {
return null;
},
},
timelineSet: {
type: Object,
default: function () {
return null;
},
},
},
data() {
return {
@ -44,7 +50,7 @@ export default {
return this.$audioPlayer.addListener(this._uid, this.event);
},
play() {
this.$audioPlayer.play(this.event);
this.$audioPlayer.play(this.event, this.timelineSet);
},
pause() {
this.$audioPlayer.pause(this.event);

View file

@ -1,7 +1,7 @@
<template>
<message-incoming v-bind="{...$props, ...$attrs}" v-on="$listeners">
<div class="bubble audio-bubble">
<audio-player :event="event">{{ $t('fallbacks.audio_file')}}</audio-player>
<audio-player :event="event" :timelineSet="timelineSet">{{ $t('fallbacks.audio_file')}}</audio-player>
</div>
</message-incoming>
</template>

View file

@ -1,7 +1,7 @@
<template>
<message-outgoing v-bind="{ ...$props, ...$attrs }" v-on="$listeners">
<div class="audio-bubble">
<audio-player :event="event">{{ $t('fallbacks.audio_file')}}</audio-player>
<audio-player :event="event" :timelineSet="timelineSet">{{ $t('fallbacks.audio_file')}}</audio-player>
</div>
</message-outgoing>
</template>