Skip to content

Commit

Permalink
Fix small bug on the AudioTrack
Browse files Browse the repository at this point in the history
  • Loading branch information
mfcar committed May 4, 2024
1 parent bfcf4e3 commit 1a9aaf1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions client/players/AudioTrack.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 || {}

Expand Down
2 changes: 2 additions & 0 deletions client/players/LocalAudioPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,15 @@ 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"
trackElement.kind = "subtitles"
trackElement.label = "Transcription"
trackElement.default = true
trackElement.src = this.currentTrack.relativeTranscriptionUrl

this.player.appendChild(trackElement)
}

Expand Down

0 comments on commit 1a9aaf1

Please sign in to comment.