From e8bb5b6b3a1e4c2aeab368f01cc5092d8478b893 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 21 Apr 2021 09:46:55 +0200 Subject: Fix context menu when watching a playlist --- .../app/+videos/+video-watch/video-watch.component.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'client/src/app') 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 366e9bb57..2216bdd4a 100644 --- a/client/src/app/+videos/+video-watch/video-watch.component.ts +++ b/client/src/app/+videos/+video-watch/video-watch.component.ts @@ -795,6 +795,19 @@ 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(), @@ -839,7 +852,9 @@ export class VideoWatchComponent implements OnInit, OnDestroy { videoCaptions: playerCaptions, - videoUUID: video.uuid + videoUUID: video.uuid, + + playlist: playlistOptions }, webtorrent: { -- cgit v1.2.3