diff options
Diffstat (limited to 'client/src/app/videos/+video-watch')
-rw-r--r-- | client/src/app/videos/+video-watch/video-watch.component.html | 2 | ||||
-rw-r--r-- | client/src/app/videos/+video-watch/video-watch.component.ts | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/client/src/app/videos/+video-watch/video-watch.component.html b/client/src/app/videos/+video-watch/video-watch.component.html index af90e22a1..8c173d6b3 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.html +++ b/client/src/app/videos/+video-watch/video-watch.component.html | |||
@@ -1,7 +1,7 @@ | |||
1 | <div class="row"> | 1 | <div class="row"> |
2 | <!-- We need the video container for videojs so we just hide it --> | 2 | <!-- We need the video container for videojs so we just hide it --> |
3 | <div [hidden]="videoNotFound" id="video-container"> | 3 | <div [hidden]="videoNotFound" id="video-container"> |
4 | <video id="video-element" class="video-js vjs-peertube-skin"></video> | 4 | <video [poster]="getVideoPoster()" id="video-element" class="video-js vjs-peertube-skin"></video> |
5 | </div> | 5 | </div> |
6 | 6 | ||
7 | <div *ngIf="videoNotFound" id="video-not-found">Video not found :'(</div> | 7 | <div *ngIf="videoNotFound" id="video-not-found">Video not found :'(</div> |
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 7a64406e6..7c97f0964 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts | |||
@@ -211,6 +211,12 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
211 | return Account.GET_ACCOUNT_AVATAR_URL(this.video.account) | 211 | return Account.GET_ACCOUNT_AVATAR_URL(this.video.account) |
212 | } | 212 | } |
213 | 213 | ||
214 | getVideoPoster () { | ||
215 | if (!this.video) return '' | ||
216 | |||
217 | return this.video.previewUrl | ||
218 | } | ||
219 | |||
214 | getVideoTags () { | 220 | getVideoTags () { |
215 | if (!this.video || Array.isArray(this.video.tags) === false) return [] | 221 | if (!this.video || Array.isArray(this.video.tags) === false) return [] |
216 | 222 | ||