diff options
author | Chocobozzz <me@florianbigard.com> | 2019-07-08 15:54:08 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-07-24 10:58:16 +0200 |
commit | 18a6f04c071f7a0735eb39b8c67fd51a082d1a31 (patch) | |
tree | b9fb0637878390d32b5c73d02b8eee2ef48cbfa5 /client/src/app/videos/+video-watch | |
parent | 2c0539420d77339e6afe8d7920b44af4c0dcb1e6 (diff) | |
download | PeerTube-18a6f04c071f7a0735eb39b8c67fd51a082d1a31.tar.gz PeerTube-18a6f04c071f7a0735eb39b8c67fd51a082d1a31.tar.zst PeerTube-18a6f04c071f7a0735eb39b8c67fd51a082d1a31.zip |
WIP plugins: hook on client side
Diffstat (limited to 'client/src/app/videos/+video-watch')
-rw-r--r-- | client/src/app/videos/+video-watch/video-watch.component.ts | 8 |
1 files changed, 7 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 3f1a98f89..6d8bb4b3f 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts | |||
@@ -32,6 +32,7 @@ import { Video } from '@app/shared/video/video.model' | |||
32 | import { isWebRTCDisabled, timeToInt } from '../../../assets/player/utils' | 32 | import { isWebRTCDisabled, timeToInt } from '../../../assets/player/utils' |
33 | import { VideoWatchPlaylistComponent } from '@app/videos/+video-watch/video-watch-playlist.component' | 33 | import { VideoWatchPlaylistComponent } from '@app/videos/+video-watch/video-watch-playlist.component' |
34 | import { getStoredTheater } from '../../../assets/player/peertube-player-local-storage' | 34 | import { getStoredTheater } from '../../../assets/player/peertube-player-local-storage' |
35 | import { PluginService } from '@app/core/plugins/plugin.service' | ||
35 | 36 | ||
36 | @Component({ | 37 | @Component({ |
37 | selector: 'my-video-watch', | 38 | selector: 'my-video-watch', |
@@ -85,6 +86,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
85 | private serverService: ServerService, | 86 | private serverService: ServerService, |
86 | private restExtractor: RestExtractor, | 87 | private restExtractor: RestExtractor, |
87 | private notifier: Notifier, | 88 | private notifier: Notifier, |
89 | private pluginService: PluginService, | ||
88 | private markdownService: MarkdownService, | 90 | private markdownService: MarkdownService, |
89 | private zone: NgZone, | 91 | private zone: NgZone, |
90 | private redirectService: RedirectService, | 92 | private redirectService: RedirectService, |
@@ -98,7 +100,9 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
98 | return this.authService.getUser() | 100 | return this.authService.getUser() |
99 | } | 101 | } |
100 | 102 | ||
101 | ngOnInit () { | 103 | async ngOnInit () { |
104 | await this.pluginService.loadPluginsByScope('video-watch') | ||
105 | |||
102 | this.configSub = this.serverService.configLoaded | 106 | this.configSub = this.serverService.configLoaded |
103 | .subscribe(() => { | 107 | .subscribe(() => { |
104 | if ( | 108 | if ( |
@@ -126,6 +130,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
126 | this.initHotkeys() | 130 | this.initHotkeys() |
127 | 131 | ||
128 | this.theaterEnabled = getStoredTheater() | 132 | this.theaterEnabled = getStoredTheater() |
133 | |||
134 | this.pluginService.runHook('action:video-watch.loaded') | ||
129 | } | 135 | } |
130 | 136 | ||
131 | ngOnDestroy () { | 137 | ngOnDestroy () { |