diff options
author | Chocobozzz <me@florianbigard.com> | 2023-03-10 12:01:21 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-03-10 15:45:52 +0100 |
commit | 3b504f6ed4e890bebb46d0481aba15b43050323a (patch) | |
tree | bbe4c1bc529fec28e0b46263ec92f7c2260ba65a /client/src/app/+videos/+video-watch | |
parent | 4899138ec5995075c3681ccbd9f6b163fb915991 (diff) | |
download | PeerTube-3b504f6ed4e890bebb46d0481aba15b43050323a.tar.gz PeerTube-3b504f6ed4e890bebb46d0481aba15b43050323a.tar.zst PeerTube-3b504f6ed4e890bebb46d0481aba15b43050323a.zip |
Add ability for plugins to alter video jsonld
Diffstat (limited to 'client/src/app/+videos/+video-watch')
-rw-r--r-- | client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.ts | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.ts b/client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.ts index ebfb42711..1834f7be5 100644 --- a/client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.ts +++ b/client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.ts | |||
@@ -22,11 +22,11 @@ export class VideoAttributesComponent implements OnInit { | |||
22 | constructor (private hooks: HooksService) { } | 22 | constructor (private hooks: HooksService) { } |
23 | 23 | ||
24 | async ngOnInit () { | 24 | async ngOnInit () { |
25 | this.pluginMetadata = await this.hooks.wrapFunResult( | 25 | this.pluginMetadata = await this.hooks.wrapObject( |
26 | this.buildPluginMetadata.bind(this), | 26 | this.pluginMetadata, |
27 | { video: this.video }, | ||
28 | 'video-watch', | 27 | 'video-watch', |
29 | 'filter:video-watch.video-plugin-metadata.result' | 28 | 'filter:video-watch.video-plugin-metadata.result', |
29 | { video: this.video } | ||
30 | ) | 30 | ) |
31 | } | 31 | } |
32 | 32 | ||
@@ -39,11 +39,4 @@ export class VideoAttributesComponent implements OnInit { | |||
39 | 39 | ||
40 | return this.video.tags | 40 | return this.video.tags |
41 | } | 41 | } |
42 | |||
43 | // Used for plugin hooks | ||
44 | private buildPluginMetadata (_options: { | ||
45 | video: VideoDetails | ||
46 | }): PluginMetadata[] { | ||
47 | return [] | ||
48 | } | ||
49 | } | 42 | } |