Skip to content

Commit

Permalink
perf: 优化共享视频的预览
Browse files Browse the repository at this point in the history
  • Loading branch information
jamebal committed Mar 27, 2024
1 parent d2bc98b commit f398f78
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/preview/VideoPreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ export default {
if (this.file.m3u8) {
videoUrl = `${fileConfig.baseUrl}/video/hls/${this.file.m3u8}`
if (this.shareId) {
videoUrl = `${fileConfig.baseUrl}/public/video/hls/${this.file.m3u8}`
const shareToken = this.$store.getters.shareToken ? this.$store.getters.shareToken : 'token'
videoUrl = `${fileConfig.baseUrl}/public/video/hls/${window.shareId}/${shareToken}/${this.file.m3u8}`
}
}
this.option.url = videoUrl
Expand Down Expand Up @@ -187,8 +188,7 @@ export default {
iina.href = `iina://weblink?url=${this.videoLink}`
// nplayer
const nplayer = doc.querySelector('[data-index="2"]').querySelector('a');
const link = `nplayer-${this.videoLink}`
nplayer.href = link
nplayer.href = `nplayer-${this.videoLink}`
// infuse
const infuse = doc.querySelector('[data-index="3"]').querySelector('a');
infuse.href = `infuse://x-callback-url/play?url=${this.videoLink}`
Expand Down

0 comments on commit f398f78

Please sign in to comment.