X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fshared-video-miniature%2Fvideo-download.component.ts;h=90f4daf7c9d80ab4986b52966eb5822c80292dcd;hb=51294901cf2be31d4f9cd846bf5534c9982c4b6f;hp=70b27b105437dfb780a8ff6243eb3eaccf0bd793;hpb=e6ea0cac4473037df16437a4a128aa6d76a1cfdc;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/shared/shared-video-miniature/video-download.component.ts b/client/src/app/shared/shared-video-miniature/video-download.component.ts index 70b27b105..90f4daf7c 100644 --- a/client/src/app/shared/shared-video-miniature/video-download.component.ts +++ b/client/src/app/shared/shared-video-miniature/video-download.component.ts @@ -116,7 +116,7 @@ export class VideoDownloadComponent { const file = this.videoFile if (!file) return - const suffix = this.video.privacy.id === VideoPrivacy.PRIVATE || this.video.privacy.id === VideoPrivacy.INTERNAL + const suffix = this.isConfidentialVideo() ? '?access_token=' + this.auth.getAccessToken() : '' @@ -129,6 +129,10 @@ export class VideoDownloadComponent { } } + isConfidentialVideo () { + return this.video.privacy.id === VideoPrivacy.PRIVATE || this.video.privacy.id === VideoPrivacy.INTERNAL + } + getSubtitlesLink () { return window.location.origin + this.videoCaptions.find(caption => caption.language.id === this.subtitleLanguageId).captionPath }