aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-12-16 09:54:45 +0100
committerChocobozzz <me@florianbigard.com>2021-12-16 10:08:55 +0100
commit85302118227bad232afdebb84a5c245f862366bd (patch)
treea3969d4bc60763c2318e95674386c8a4f1e3f6c6 /shared
parentb65de1be4dcf626c552be613d531d3f6e23c6085 (diff)
downloadPeerTube-85302118227bad232afdebb84a5c245f862366bd.tar.gz
PeerTube-85302118227bad232afdebb84a5c245f862366bd.tar.zst
PeerTube-85302118227bad232afdebb84a5c245f862366bd.zip
Add ability to disable p2p in embed with URL
Diffstat (limited to 'shared')
-rw-r--r--shared/core-utils/common/url.ts2
1 files changed, 2 insertions, 0 deletions
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: {
50 warningTitle?: boolean 50 warningTitle?: boolean
51 controls?: boolean 51 controls?: boolean
52 peertubeLink?: boolean 52 peertubeLink?: boolean
53 p2p?: boolean
53}) { 54}) {
54 const { url } = options 55 const { url } = options
55 56
@@ -74,6 +75,7 @@ function decorateVideoLink (options: {
74 if (options.warningTitle === false) params.set('warningTitle', '0') 75 if (options.warningTitle === false) params.set('warningTitle', '0')
75 if (options.controls === false) params.set('controls', '0') 76 if (options.controls === false) params.set('controls', '0')
76 if (options.peertubeLink === false) params.set('peertubeLink', '0') 77 if (options.peertubeLink === false) params.set('peertubeLink', '0')
78 if (options.p2p !== undefined) params.set('p2p', options.p2p ? '1' : '0')
77 79
78 return buildUrl(url, params) 80 return buildUrl(url, params)
79} 81}