aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--client/src/app/videos/+video-watch/video-watch.component.ts5
-rw-r--r--shared/models/plugins/client-hook.model.ts2
2 files changed, 6 insertions, 1 deletions
diff --git a/client/src/app/videos/+video-watch/video-watch.component.ts b/client/src/app/videos/+video-watch/video-watch.component.ts
index 1e7991738..af4afd456 100644
--- a/client/src/app/videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/videos/+video-watch/video-watch.component.ts
@@ -20,6 +20,7 @@ import { environment } from '../../../environments/environment'
20import { VideoCaptionService } from '@app/shared/video-caption' 20import { VideoCaptionService } from '@app/shared/video-caption'
21import { MarkdownService } from '@app/shared/renderer' 21import { MarkdownService } from '@app/shared/renderer'
22import { 22import {
23 videojs,
23 CustomizationOptions, 24 CustomizationOptions,
24 P2PMediaLoaderOptions, 25 P2PMediaLoaderOptions,
25 PeertubePlayerManager, 26 PeertubePlayerManager,
@@ -500,6 +501,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
500 this.player.on('theaterChange', (_: any, enabled: boolean) => { 501 this.player.on('theaterChange', (_: any, enabled: boolean) => {
501 this.zone.run(() => this.theaterEnabled = enabled) 502 this.zone.run(() => this.theaterEnabled = enabled)
502 }) 503 })
504
505 this.hooks.runAction('action:video-watch.player.loaded', 'video-watch', { player: this.player })
503 }) 506 })
504 507
505 this.setVideoDescriptionHTML() 508 this.setVideoDescriptionHTML()
@@ -508,7 +511,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
508 this.setOpenGraphTags() 511 this.setOpenGraphTags()
509 this.checkUserRating() 512 this.checkUserRating()
510 513
511 this.hooks.runAction('action:video-watch.video.loaded', 'video-watch') 514 this.hooks.runAction('action:video-watch.video.loaded', 'video-watch', { videojs })
512 } 515 }
513 516
514 private autoplayNext () { 517 private autoplayNext () {
diff --git a/shared/models/plugins/client-hook.model.ts b/shared/models/plugins/client-hook.model.ts
index fd560302c..07ea7eb96 100644
--- a/shared/models/plugins/client-hook.model.ts
+++ b/shared/models/plugins/client-hook.model.ts
@@ -51,6 +51,8 @@ export const clientActionHookObject = {
51 'action:video-watch.init': true, 51 'action:video-watch.init': true,
52 // Fired when the video watch page loaded the video 52 // Fired when the video watch page loaded the video
53 'action:video-watch.video.loaded': true, 53 'action:video-watch.video.loaded': true,
54 // Fired when the player finished loading
55 'action:video-watch.player.loaded': true,
54 56
55 // Fired when the search page is being initialized 57 // Fired when the search page is being initialized
56 'action:search.init': true, 58 'action:search.init': true,