diff options
author | Chocobozzz <me@florianbigard.com> | 2023-03-10 12:01:21 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-03-10 14:42:18 +0100 |
commit | 866b5d3f5230204d611a556260102996c1aefe10 (patch) | |
tree | d6d1e900ce81a7f1edc121089c10a67abba855eb /client/src/app/+videos | |
parent | 4265d90b0061399e23b816e3880ee1be47ead96f (diff) | |
download | PeerTube-866b5d3f5230204d611a556260102996c1aefe10.tar.gz PeerTube-866b5d3f5230204d611a556260102996c1aefe10.tar.zst PeerTube-866b5d3f5230204d611a556260102996c1aefe10.zip |
Add ability for plugins to alter video jsonld
Diffstat (limited to 'client/src/app/+videos')
-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 | } |