Skip to content

Commit

Permalink
Remove semicolon
Browse files Browse the repository at this point in the history
  • Loading branch information
mfcar committed May 4, 2024
1 parent 35f51f4 commit bfcf4e3
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion client/components/app/MediaPlayerContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
8 changes: 4 additions & 4 deletions client/components/player/TranscriptionUi.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@
</template>

<script>
import TranscriptionLine from "./TranscriptionLine.vue";
import TranscriptionLine from "./TranscriptionLine.vue"
export default {
components: {
TranscriptionLine
},
watch: {
trackElement() {
this.setCues();
this.setCues()
}
},
data() {
return {
cues: [],
trackElement: null
};
}
},
mounted() {
this.init()
Expand All @@ -45,7 +45,7 @@ export default {
this.cues = this.trackElement.track.cues
}
},
};
}
</script>
<style>
#transcription-panel {
Expand Down
22 changes: 11 additions & 11 deletions client/players/LocalAudioPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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");

trackElement.id = "transcription-track";
trackElement.kind = "subtitles";
trackElement.label = "Transcription";
trackElement.default = true;
trackElement.src = this.currentTrack.relativeTranscriptionUrl;
this.player.appendChild(trackElement);
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)
}

destroyHlsInstance() {
Expand Down
8 changes: 4 additions & 4 deletions server/controllers/LibraryItemController.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
}

/**
Expand Down

0 comments on commit bfcf4e3

Please sign in to comment.