Video-watch hooks modifications for videojs
This commit is contained in:
parent
76d5770b7a
commit
5f85f8aa1c
|
@ -20,6 +20,7 @@ import { environment } from '../../../environments/environment'
|
||||||
import { VideoCaptionService } from '@app/shared/video-caption'
|
import { VideoCaptionService } from '@app/shared/video-caption'
|
||||||
import { MarkdownService } from '@app/shared/renderer'
|
import { MarkdownService } from '@app/shared/renderer'
|
||||||
import {
|
import {
|
||||||
|
videojs,
|
||||||
CustomizationOptions,
|
CustomizationOptions,
|
||||||
P2PMediaLoaderOptions,
|
P2PMediaLoaderOptions,
|
||||||
PeertubePlayerManager,
|
PeertubePlayerManager,
|
||||||
|
@ -500,6 +501,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
|
||||||
this.player.on('theaterChange', (_: any, enabled: boolean) => {
|
this.player.on('theaterChange', (_: any, enabled: boolean) => {
|
||||||
this.zone.run(() => this.theaterEnabled = enabled)
|
this.zone.run(() => this.theaterEnabled = enabled)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
this.hooks.runAction('action:video-watch.player.loaded', 'video-watch', { player: this.player })
|
||||||
})
|
})
|
||||||
|
|
||||||
this.setVideoDescriptionHTML()
|
this.setVideoDescriptionHTML()
|
||||||
|
@ -508,7 +511,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
|
||||||
this.setOpenGraphTags()
|
this.setOpenGraphTags()
|
||||||
this.checkUserRating()
|
this.checkUserRating()
|
||||||
|
|
||||||
this.hooks.runAction('action:video-watch.video.loaded', 'video-watch')
|
this.hooks.runAction('action:video-watch.video.loaded', 'video-watch', { videojs })
|
||||||
}
|
}
|
||||||
|
|
||||||
private autoplayNext () {
|
private autoplayNext () {
|
||||||
|
|
|
@ -51,6 +51,8 @@ export const clientActionHookObject = {
|
||||||
'action:video-watch.init': true,
|
'action:video-watch.init': true,
|
||||||
// Fired when the video watch page loaded the video
|
// Fired when the video watch page loaded the video
|
||||||
'action:video-watch.video.loaded': true,
|
'action:video-watch.video.loaded': true,
|
||||||
|
// Fired when the player finished loading
|
||||||
|
'action:video-watch.player.loaded': true,
|
||||||
|
|
||||||
// Fired when the search page is being initialized
|
// Fired when the search page is being initialized
|
||||||
'action:search.init': true,
|
'action:search.init': true,
|
||||||
|
|
Loading…
Reference in New Issue