X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2F%2Bvideos%2F%2Bvideo-watch%2Fvideo-watch.component.ts;h=1f24c898e31965054dfd54e2322ecbbb5d5a49b4;hb=33d21a9b47b983ee7a5c5ba6d8a416c35fe66cf9;hp=2216bdd4a194072b0b2d35ff21ba4c01cbfa4577;hpb=e8bb5b6b3a1e4c2aeab368f01cc5092d8478b893;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 2216bdd4a..1f24c898e 100644 --- a/client/src/app/+videos/+video-watch/video-watch.component.ts +++ b/client/src/app/+videos/+video-watch/video-watch.component.ts @@ -795,23 +795,14 @@ export class VideoWatchComponent implements OnInit, OnDestroy { src: environment.apiUrl + c.captionPath })) - const playlistOptions = this.playlist - ? { - createComponent: false, - - playlist: this.playlist, - - getCurrentPosition: () => this.playlistPosition, - - embedUrl: this.playlist.embedUrl, - embedTitle: this.playlist.displayName - } - : undefined - const options: PeertubePlayerManagerOptions = { 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, @@ -852,9 +843,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { videoCaptions: playerCaptions, - videoUUID: video.uuid, - - playlist: playlistOptions + videoUUID: video.uuid }, webtorrent: {