Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fixed "previous" button showing when not watching a playlist

Poslovitchdfdcbb948aa2
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 1f24c898e3..025c62430c 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 {
common: {
autoplay: this.isAutoplay(),
nextVideo: () => this.zone.run(() => this.autoplayNext()),
- previousVideo: () => this.zone.run(() => {
- // FIXME: Only show if this is a playlist
- if (this.playlist) this.zone.run(() => this.videoWatchPlaylist.navigateToPreviousPlaylistVideo())
- }),
playerElement: this.playerElement,
onPlayerElementChange: (element: HTMLVideoElement) => this.playerElement = element,
@@ -851,6 +847,11 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
}
}
+ // Only set this if we're in a playlist
+ if (this.playlist) options.common.previousVideo = () => {
+ this.zone.run(() => this.videoWatchPlaylist.navigateToPreviousPlaylistVideo())
+ }
+
let mode: PlayerMode
if (urlOptions.playerMode) {