audiobookshelf/client/components/player/TranscriptionUi.vue
2024-05-04 12:21:07 +01:00

44 lines
765 B
Vue

<template>
<div id="transcription-panel">
<transcription-line
v-for="(cue, index) in cues"
:key="index"
:cue="cue"
ref="transcriptionLine + index"
@seek="seek"
></transcription-line>
</div>
</template>
<script>
import TranscriptionLine from "./TranscriptionLine.vue";
export default {
components: {
TranscriptionLine
},
data() {
return {
cues: [],
};
},
mounted() {
this.init()
},
methods: {
init() {
const trackElement = document.getElementById("transcription-track");
this.cues = trackElement.track.cues;
},
seek(time) {
this.$emit('seek', time)
},
},
};
</script>
<style>
#transcription-panel {
max-height: 75px;
overflow-y: auto;
}
</style>