aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorPoslovitch <poslovitch@bentobox.world>2021-04-24 12:04:48 +0000
committerChocobozzz <chocobozzz@cpy.re>2021-04-26 10:54:02 +0200
commitdfdcbb948aa2440efc2425569dce947c9cb00378 (patch)
treee9e704e66ed49461a6a8eb3ce3eb5773b4361fd1
parent33d21a9b47b983ee7a5c5ba6d8a416c35fe66cf9 (diff)
downloadPeerTube-dfdcbb948aa2440efc2425569dce947c9cb00378.tar.gz
PeerTube-dfdcbb948aa2440efc2425569dce947c9cb00378.tar.zst
PeerTube-dfdcbb948aa2440efc2425569dce947c9cb00378.zip
Fixed "previous" button showing when not watching a playlist
-rw-r--r--client/src/app/+videos/+video-watch/video-watch.component.ts9
1 files changed, 5 insertions, 4 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 1f24c898e..025c62430 100644
--- a/client/src/app/+videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/+videos/+video-watch/video-watch.component.ts
@@ -799,10 +799,6 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
799 common: { 799 common: {
800 autoplay: this.isAutoplay(), 800 autoplay: this.isAutoplay(),
801 nextVideo: () => this.zone.run(() => this.autoplayNext()), 801 nextVideo: () => this.zone.run(() => this.autoplayNext()),
802 previousVideo: () => this.zone.run(() => {
803 // FIXME: Only show if this is a playlist
804 if (this.playlist) this.zone.run(() => this.videoWatchPlaylist.navigateToPreviousPlaylistVideo())
805 }),
806 802
807 playerElement: this.playerElement, 803 playerElement: this.playerElement,
808 onPlayerElementChange: (element: HTMLVideoElement) => this.playerElement = element, 804 onPlayerElementChange: (element: HTMLVideoElement) => this.playerElement = element,
@@ -851,6 +847,11 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
851 } 847 }
852 } 848 }
853 849
850 // Only set this if we're in a playlist
851 if (this.playlist) options.common.previousVideo = () => {
852 this.zone.run(() => this.videoWatchPlaylist.navigateToPreviousPlaylistVideo())
853 }
854
854 let mode: PlayerMode 855 let mode: PlayerMode
855 856
856 if (urlOptions.playerMode) { 857 if (urlOptions.playerMode) {