X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fvideos%2F%2Bvideo-watch%2Fvideo-watch.component.ts;h=0007331f8651d53a792b862ae7dc1cd68717439f;hb=f56ebb3616606e678b25d8064696c75655dcd2ed;hp=80aa8ebe47685be3ded7bd7a41524a493585b0bc;hpb=d275e75453015352d5b9387eaf5078e1ba5e0ea2;p=github%2FChocobozzz%2FPeerTube.git 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 80aa8ebe4..0007331f8 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts @@ -203,10 +203,14 @@ export class VideoWatchComponent implements OnInit, OnDestroy { } showSupportModal () { + this.pausePlayer() + this.videoSupportModal.show() } showShareModal () { + this.pausePlayer() + this.videoShareModal.show(this.currentTime) } @@ -227,6 +231,10 @@ export class VideoWatchComponent implements OnInit, OnDestroy { } } + onModalOpened () { + this.pausePlayer() + } + onVideoRemoved () { this.redirectService.redirectToHomepage() } @@ -622,4 +630,10 @@ export class VideoWatchComponent implements OnInit, OnDestroy { ] if (this.isUserLoggedIn()) this.hotkeysService.add(this.hotkeys) } + + private pausePlayer () { + if (!this.player) return + + this.player.pause() + } }