mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Add ability to disable p2p in embed with URL
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user