+ getCaption () {
+ const caption = this.getCaptions()
+ .find(c => c.language.id === this.subtitleLanguageId)
+
+ if (!caption) {
+ console.error('Cannot find caption %s.', this.subtitleLanguageId)
+ return undefined
+ }
+
+ return caption
+ }
+
+ getCaptionLink () {
+ const caption = this.getCaption()
+ if (!caption) return ''
+
+ return window.location.origin + caption.captionPath
+ }
+
+ isConfidentialVideo () {
+ return this.video.privacy.id === VideoPrivacy.PRIVATE || this.video.privacy.id === VideoPrivacy.INTERNAL