aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app')
-rw-r--r--client/src/app/+videos/+video-watch/video-watch.component.html2
-rw-r--r--client/src/app/+videos/+video-watch/video-watch.component.ts37
2 files changed, 2 insertions, 37 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 5d417609a..99103c2c3 100644
--- a/client/src/app/+videos/+video-watch/video-watch.component.html
+++ b/client/src/app/+videos/+video-watch/video-watch.component.html
@@ -142,7 +142,7 @@
142 <ng-container *ngIf="isUserLoggedIn()"> 142 <ng-container *ngIf="isUserLoggedIn()">
143 <my-video-actions-dropdown 143 <my-video-actions-dropdown
144 placement="bottom auto" buttonDirection="horizontal" [buttonStyled]="true" [video]="video" [videoCaptions]="videoCaptions" 144 placement="bottom auto" buttonDirection="horizontal" [buttonStyled]="true" [video]="video" [videoCaptions]="videoCaptions"
145 [displayOptions]="videoActionsOptions" (videoRemoved)="onVideoRemoved()" (modalOpened)="onModalOpened()" 145 [displayOptions]="videoActionsOptions" (videoRemoved)="onVideoRemoved()"
146 ></my-video-actions-dropdown> 146 ></my-video-actions-dropdown>
147 </ng-container> 147 </ng-container>
148 </div> 148 </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 7f3ceeebc..de5fb4ed0 100644
--- a/client/src/app/+videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/+videos/+video-watch/video-watch.component.ts
@@ -284,23 +284,10 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
284 } 284 }
285 285
286 showSupportModal () { 286 showSupportModal () {
287 // Check video was playing before opening support modal 287 this.supportModal.show()
288 const isVideoPlaying = this.isPlaying()
289
290 this.pausePlayer()
291
292 const modalRef = this.supportModal.show()
293
294 modalRef.result.then(() => {
295 if (isVideoPlaying) {
296 this.resumePlayer()
297 }
298 })
299 } 288 }
300 289
301 showShareModal () { 290 showShareModal () {
302 this.pausePlayer()
303
304 this.videoShareModal.show(this.currentTime, this.videoWatchPlaylist.currentPlaylistPosition) 291 this.videoShareModal.show(this.currentTime, this.videoWatchPlaylist.currentPlaylistPosition)
305 } 292 }
306 293
@@ -323,10 +310,6 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
323 } 310 }
324 } 311 }
325 312
326 onModalOpened () {
327 this.pausePlayer()
328 }
329
330 onVideoRemoved () { 313 onVideoRemoved () {
331 this.redirectService.redirectToHomepage() 314 this.redirectService.redirectToHomepage()
332 } 315 }
@@ -884,24 +867,6 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
884 return { playerMode: mode, playerOptions: options } 867 return { playerMode: mode, playerOptions: options }
885 } 868 }
886 869
887 private pausePlayer () {
888 if (!this.player) return
889
890 this.player.pause()
891 }
892
893 private resumePlayer () {
894 if (!this.player) return
895
896 this.player.play()
897 }
898
899 private isPlaying () {
900 if (!this.player) return
901
902 return !this.player.paused()
903 }
904
905 private async subscribeToLiveEventsIfNeeded (oldVideo: VideoDetails, newVideo: VideoDetails) { 870 private async subscribeToLiveEventsIfNeeded (oldVideo: VideoDetails, newVideo: VideoDetails) {
906 if (!this.liveVideosSub) { 871 if (!this.liveVideosSub) {
907 this.liveVideosSub = this.buildLiveEventsSubscription() 872 this.liveVideosSub = this.buildLiveEventsSubscription()