From f95628636b6ccdf3eae2449ca718e075b072f678 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 20 Aug 2020 11:46:25 +0200 Subject: Support plugin hooks in embed --- shared/models/plugins/client-hook.model.ts | 8 +++++++- shared/models/plugins/plugin-client-scope.type.ts | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'shared') diff --git a/shared/models/plugins/client-hook.model.ts b/shared/models/plugins/client-hook.model.ts index b53b8de99..193a3f646 100644 --- a/shared/models/plugins/client-hook.model.ts +++ b/shared/models/plugins/client-hook.model.ts @@ -80,7 +80,13 @@ export const clientActionHookObject = { 'action:router.navigation-end': true, // Fired when the registration page is being initialized - 'action:signup.register.init': true + 'action:signup.register.init': true, + + // ####### Embed hooks ####### + // In embed scope, peertube helpers are not available + + // Fired when the embed loaded the player + 'action:embed.player.loaded': true } export type ClientActionHookName = keyof typeof clientActionHookObject diff --git a/shared/models/plugins/plugin-client-scope.type.ts b/shared/models/plugins/plugin-client-scope.type.ts index d112434e8..a3c669fe7 100644 --- a/shared/models/plugins/plugin-client-scope.type.ts +++ b/shared/models/plugins/plugin-client-scope.type.ts @@ -1 +1 @@ -export type PluginClientScope = 'common' | 'video-watch' | 'search' | 'signup' | 'login' +export type PluginClientScope = 'common' | 'video-watch' | 'search' | 'signup' | 'login' | 'embed' -- cgit v1.2.3