From 85302118227bad232afdebb84a5c245f862366bd Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 16 Dec 2021 09:54:45 +0100 Subject: Add ability to disable p2p in embed with URL --- shared/core-utils/common/url.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'shared') diff --git a/shared/core-utils/common/url.ts b/shared/core-utils/common/url.ts index 9c111cbcc..8020d9b28 100644 --- a/shared/core-utils/common/url.ts +++ b/shared/core-utils/common/url.ts @@ -50,6 +50,7 @@ function decorateVideoLink (options: { warningTitle?: boolean controls?: boolean peertubeLink?: boolean + p2p?: boolean }) { const { url } = options @@ -74,6 +75,7 @@ function decorateVideoLink (options: { if (options.warningTitle === false) params.set('warningTitle', '0') if (options.controls === false) params.set('controls', '0') if (options.peertubeLink === false) params.set('peertubeLink', '0') + if (options.p2p !== undefined) params.set('p2p', options.p2p ? '1' : '0') return buildUrl(url, params) } -- cgit v1.2.3