- getRatePopoverText () {
- if (this.isUserLoggedIn()) return undefined
-
- return $localize`You need to be <a href="/login">logged in</a> to rate this video.`
- }
-
- showMoreDescription () {
- if (this.completeVideoDescription === undefined) {
- return this.loadCompleteDescription()
- }
-
- this.updateVideoDescription(this.completeVideoDescription)
- this.completeDescriptionShown = true
- }
-
- showLessDescription () {
- this.updateVideoDescription(this.shortVideoDescription)
- this.completeDescriptionShown = false
- }
-
- showDownloadModal () {
- this.videoDownloadModal.show(this.video, this.videoCaptions)
- }
-
- isVideoDownloadable () {
- return this.video && this.video instanceof VideoDetails && this.video.downloadEnabled && !this.video.isLive
- }
-
- loadCompleteDescription () {
- this.descriptionLoading = true
-
- this.videoService.loadCompleteDescription(this.video.descriptionPath)
- .subscribe(
- description => {
- this.completeDescriptionShown = true
- this.descriptionLoading = false
-
- this.shortVideoDescription = this.video.description
- this.completeVideoDescription = description
-
- this.updateVideoDescription(this.completeVideoDescription)
- },