mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-12 04:11:43 +00:00
Remove semicolon
This commit is contained in:
parent
35f51f4e98
commit
bfcf4e317f
4 changed files with 19 additions and 19 deletions
|
|
@ -71,7 +71,7 @@
|
|||
|
||||
<script>
|
||||
import PlayerHandler from '@/players/PlayerHandler'
|
||||
import TranscriptionUi from "@/components/player/TranscriptionUi.vue";
|
||||
import TranscriptionUi from "@/components/player/TranscriptionUi.vue"
|
||||
|
||||
export default {
|
||||
components: {TranscriptionUi},
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import TranscriptionLine from "./TranscriptionLine.vue";
|
||||
import TranscriptionLine from "./TranscriptionLine.vue"
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
|
@ -19,14 +19,14 @@ export default {
|
|||
},
|
||||
watch: {
|
||||
trackElement() {
|
||||
this.setCues();
|
||||
this.setCues()
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
cues: [],
|
||||
trackElement: null
|
||||
};
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init()
|
||||
|
|
@ -45,7 +45,7 @@ export default {
|
|||
this.cues = this.trackElement.track.cues
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
#transcription-panel {
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ export default class LocalAudioPlayer extends EventEmitter {
|
|||
this.player.src = this.currentTrack.relativeContentUrl
|
||||
this.player.currentTime = this.startTime
|
||||
|
||||
this.createTranscriptionTrack();
|
||||
this.createTranscriptionTrack()
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -211,23 +211,23 @@ export default class LocalAudioPlayer extends EventEmitter {
|
|||
this.player.src = this.currentTrack.relativeContentUrl
|
||||
console.log(`[LocalPlayer] Loading track src ${this.currentTrack.relativeContentUrl}`)
|
||||
|
||||
this.createTranscriptionTrack();
|
||||
this.createTranscriptionTrack()
|
||||
|
||||
this.player.load()
|
||||
}
|
||||
|
||||
createTranscriptionTrack() {
|
||||
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.kind = "subtitles";
|
||||
trackElement.label = "Transcription";
|
||||
trackElement.default = true;
|
||||
trackElement.src = this.currentTrack.relativeTranscriptionUrl;
|
||||
this.player.appendChild(trackElement);
|
||||
trackElement.id = "transcription-track"
|
||||
trackElement.kind = "subtitles"
|
||||
trackElement.label = "Transcription"
|
||||
trackElement.default = true
|
||||
trackElement.src = this.currentTrack.relativeTranscriptionUrl
|
||||
this.player.appendChild(trackElement)
|
||||
}
|
||||
|
||||
destroyHlsInstance() {
|
||||
|
|
|
|||
|
|
@ -649,9 +649,9 @@ class LibraryItemController {
|
|||
async getTranscriptionFile(req, res) {
|
||||
const libraryFile = req.libraryFile
|
||||
|
||||
const baseName = Path.basename(libraryFile.metadata.path, Path.extname(libraryFile.metadata.path));
|
||||
const baseName = Path.basename(libraryFile.metadata.path, Path.extname(libraryFile.metadata.path))
|
||||
|
||||
const vttFilePath = Path.join(Path.dirname(libraryFile.metadata.path), `${baseName}.vtt`);
|
||||
const vttFilePath = Path.join(Path.dirname(libraryFile.metadata.path), `${baseName}.vtt`)
|
||||
|
||||
if (global.XAccel) {
|
||||
const encodedURI = encodeUriPath(global.XAccel + vttFilePath)
|
||||
|
|
@ -660,9 +660,9 @@ class LibraryItemController {
|
|||
}
|
||||
|
||||
// Set the correct mimetype for .vtt files
|
||||
res.setHeader('Content-Type', 'text/vtt');
|
||||
res.setHeader('Content-Type', 'text/vtt')
|
||||
|
||||
res.sendFile(vttFilePath);
|
||||
res.sendFile(vttFilePath)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue