1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 03:50:26 +02:00

Add hooks support for video download

This commit is contained in:
Chocobozzz 2021-03-23 11:54:08 +01:00
parent c0ab041c2c
commit 4bc45da342
No known key found for this signature in database
GPG key ID: 583A612D890159BE
7 changed files with 198 additions and 20 deletions

View file

@ -85,8 +85,12 @@ export const clientActionHookObject = {
// Fired when the registration page is being initialized
'action:signup.register.init': true,
// Fired when the modal to download a video/caption is shown
'action:modal.video-download.shown': true,
// ####### Embed hooks #######
// In embed scope, peertube helpers are not available
// /!\ In embed scope, peertube helpers are not available
// ###########################
// Fired when the embed loaded the player
'action:embed.player.loaded': true

View file

@ -50,7 +50,11 @@ export const serverFilterHookObject = {
'filter:video.auto-blacklist.result': true,
// Filter result used to check if a user can register on the instance
'filter:api.user.signup.allowed.result': true
'filter:api.user.signup.allowed.result': true,
// Filter result used to check if video/torrent download is allowed
'filter:api.download.video.allowed.result': true,
'filter:api.download.torrent.allowed.result': true
}
export type ServerFilterHookName = keyof typeof serverFilterHookObject