mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-12 12:21:34 +00:00
Fix small bug on the AudioTrack
This commit is contained in:
parent
bfcf4e317f
commit
1a9aaf17a6
2 changed files with 3 additions and 0 deletions
|
|
@ -5,6 +5,7 @@ export default class AudioTrack {
|
||||||
this.duration = track.duration || 0
|
this.duration = track.duration || 0
|
||||||
this.title = track.title || ''
|
this.title = track.title || ''
|
||||||
this.contentUrl = track.contentUrl || null
|
this.contentUrl = track.contentUrl || null
|
||||||
|
this.transcriptUrl = track.transcriptUrl || null
|
||||||
this.mimeType = track.mimeType
|
this.mimeType = track.mimeType
|
||||||
this.metadata = track.metadata || {}
|
this.metadata = track.metadata || {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -220,6 +220,7 @@ export default class LocalAudioPlayer extends EventEmitter {
|
||||||
if (document.getElementById('transcription-track')) {
|
if (document.getElementById('transcription-track')) {
|
||||||
document.getElementById('transcription-track').remove()
|
document.getElementById('transcription-track').remove()
|
||||||
}
|
}
|
||||||
|
|
||||||
const trackElement = document.createElement("track")
|
const trackElement = document.createElement("track")
|
||||||
|
|
||||||
trackElement.id = "transcription-track"
|
trackElement.id = "transcription-track"
|
||||||
|
|
@ -227,6 +228,7 @@ export default class LocalAudioPlayer extends EventEmitter {
|
||||||
trackElement.label = "Transcription"
|
trackElement.label = "Transcription"
|
||||||
trackElement.default = true
|
trackElement.default = true
|
||||||
trackElement.src = this.currentTrack.relativeTranscriptionUrl
|
trackElement.src = this.currentTrack.relativeTranscriptionUrl
|
||||||
|
|
||||||
this.player.appendChild(trackElement)
|
this.player.appendChild(trackElement)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue