From 69aabd1ae09293906ca49f9a92f9bede4dbdd1f6 Mon Sep 17 00:00:00 2001 From: Dmitry S Date: Thu, 8 Aug 2024 01:04:44 -0400 Subject: [PATCH] (core) Limit related videos when playing onboarding video tour from home page Summary: When video is opened from the app homepage, it opens in a popup, which stays open when it ends. The rel=0 parameter limits the related videos shown at the end to those from the same channel, avoiding surprising unrelated videos. This doesn't affect the video shown during initial onboarding, since that once auto-closes when it ends. Test Plan: Tested manually Reviewers: georgegevoian Reviewed By: georgegevoian Differential Revision: https://phab.getgrist.com/D4313 --- app/client/ui/OpenVideoTour.ts | 3 +++ app/client/ui/YouTubePlayer.ts | 1 + 2 files changed, 4 insertions(+) diff --git a/app/client/ui/OpenVideoTour.ts b/app/client/ui/OpenVideoTour.ts index 8bd230d3..1a0cc5db 100644 --- a/app/client/ui/OpenVideoTour.ts +++ b/app/client/ui/OpenVideoTour.ts @@ -26,6 +26,9 @@ const testId = makeTestId('test-video-tour-'); height: '100%', width: '100%', origin: getMainOrgUrl(), + playerVars: { + rel: 0, + }, }, cssYouTubePlayer.cls(''), ); diff --git a/app/client/ui/YouTubePlayer.ts b/app/client/ui/YouTubePlayer.ts index d7db5649..384f7044 100644 --- a/app/client/ui/YouTubePlayer.ts +++ b/app/client/ui/YouTubePlayer.ts @@ -29,6 +29,7 @@ export interface PlayerVars { fs?: 0 | 1; iv_load_policy?: 1 | 3; modestbranding?: 0 | 1; + rel?: 0 | 1; } export interface PlayerStateChangeEvent {