From 1a9aaf17a6f9fd71efad281d38ab501e417ef94e Mon Sep 17 00:00:00 2001 From: mfcar Date: Sat, 4 May 2024 20:49:34 +0100 Subject: [PATCH] Fix small bug on the AudioTrack --- client/players/AudioTrack.js | 1 + client/players/LocalAudioPlayer.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/client/players/AudioTrack.js b/client/players/AudioTrack.js index 96d6a8d980..451f9de016 100644 --- a/client/players/AudioTrack.js +++ b/client/players/AudioTrack.js @@ -5,6 +5,7 @@ export default class AudioTrack { this.duration = track.duration || 0 this.title = track.title || '' this.contentUrl = track.contentUrl || null + this.transcriptUrl = track.transcriptUrl || null this.mimeType = track.mimeType this.metadata = track.metadata || {} diff --git a/client/players/LocalAudioPlayer.js b/client/players/LocalAudioPlayer.js index e8392c177e..583f546c3b 100644 --- a/client/players/LocalAudioPlayer.js +++ b/client/players/LocalAudioPlayer.js @@ -220,6 +220,7 @@ export default class LocalAudioPlayer extends EventEmitter { if (document.getElementById('transcription-track')) { document.getElementById('transcription-track').remove() } + const trackElement = document.createElement("track") trackElement.id = "transcription-track" @@ -227,6 +228,7 @@ export default class LocalAudioPlayer extends EventEmitter { trackElement.label = "Transcription" trackElement.default = true trackElement.src = this.currentTrack.relativeTranscriptionUrl + this.player.appendChild(trackElement) }