aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+videos/+video-watch/video-watch.component.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-08-03 21:06:45 +0200
committerRigel Kent <par@rigelk.eu>2020-08-04 16:06:40 +0200
commit6863f814b06e4af92fd19bef23e6bd4b259988fa (patch)
treee4d1dcbb5c883389435fada4cb5bcd4effae6703 /client/src/app/+videos/+video-watch/video-watch.component.ts
parent9a42363291c9f524d9603a940f929929599271c5 (diff)
downloadPeerTube-6863f814b06e4af92fd19bef23e6bd4b259988fa.tar.gz
PeerTube-6863f814b06e4af92fd19bef23e6bd4b259988fa.tar.zst
PeerTube-6863f814b06e4af92fd19bef23e6bd4b259988fa.zip
special display case for logged-out users to display download in watch page
Diffstat (limited to 'client/src/app/+videos/+video-watch/video-watch.component.ts')
-rw-r--r--client/src/app/+videos/+video-watch/video-watch.component.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/client/src/app/+videos/+video-watch/video-watch.component.ts b/client/src/app/+videos/+video-watch/video-watch.component.ts
index 4341514cd..e355faf25 100644
--- a/client/src/app/+videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/+videos/+video-watch/video-watch.component.ts
@@ -28,6 +28,7 @@ import { environment } from '../../../environments/environment'
28import { VideoShareComponent } from './modal/video-share.component' 28import { VideoShareComponent } from './modal/video-share.component'
29import { VideoSupportComponent } from './modal/video-support.component' 29import { VideoSupportComponent } from './modal/video-support.component'
30import { VideoWatchPlaylistComponent } from './video-watch-playlist.component' 30import { VideoWatchPlaylistComponent } from './video-watch-playlist.component'
31import { VideoDownloadComponent } from '@app/shared/shared-video-miniature'
31 32
32@Component({ 33@Component({
33 selector: 'my-video-watch', 34 selector: 'my-video-watch',
@@ -41,6 +42,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
41 @ViewChild('videoShareModal') videoShareModal: VideoShareComponent 42 @ViewChild('videoShareModal') videoShareModal: VideoShareComponent
42 @ViewChild('videoSupportModal') videoSupportModal: VideoSupportComponent 43 @ViewChild('videoSupportModal') videoSupportModal: VideoSupportComponent
43 @ViewChild('subscribeButton') subscribeButton: SubscribeButtonComponent 44 @ViewChild('subscribeButton') subscribeButton: SubscribeButtonComponent
45 @ViewChild('videoDownloadModal') videoDownloadModal: VideoDownloadComponent
44 46
45 player: any 47 player: any
46 playerElement: HTMLVideoElement 48 playerElement: HTMLVideoElement
@@ -201,6 +203,14 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
201 this.completeDescriptionShown = false 203 this.completeDescriptionShown = false
202 } 204 }
203 205
206 showDownloadModal () {
207 this.videoDownloadModal.show(this.video, this.videoCaptions)
208 }
209
210 isVideoDownloadable () {
211 return this.video && this.video instanceof VideoDetails && this.video.downloadEnabled
212 }
213
204 loadCompleteDescription () { 214 loadCompleteDescription () {
205 this.descriptionLoading = true 215 this.descriptionLoading = true
206 216