aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-07-08 15:54:08 +0200
committerChocobozzz <chocobozzz@cpy.re>2019-07-24 10:58:16 +0200
commit18a6f04c071f7a0735eb39b8c67fd51a082d1a31 (patch)
treeb9fb0637878390d32b5c73d02b8eee2ef48cbfa5 /client/src/app/videos
parent2c0539420d77339e6afe8d7920b44af4c0dcb1e6 (diff)
downloadPeerTube-18a6f04c071f7a0735eb39b8c67fd51a082d1a31.tar.gz
PeerTube-18a6f04c071f7a0735eb39b8c67fd51a082d1a31.tar.zst
PeerTube-18a6f04c071f7a0735eb39b8c67fd51a082d1a31.zip
WIP plugins: hook on client side
Diffstat (limited to 'client/src/app/videos')
-rw-r--r--client/src/app/videos/+video-watch/video-watch.component.ts8
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'
32import { isWebRTCDisabled, timeToInt } from '../../../assets/player/utils' 32import { isWebRTCDisabled, timeToInt } from '../../../assets/player/utils'
33import { VideoWatchPlaylistComponent } from '@app/videos/+video-watch/video-watch-playlist.component' 33import { VideoWatchPlaylistComponent } from '@app/videos/+video-watch/video-watch-playlist.component'
34import { getStoredTheater } from '../../../assets/player/peertube-player-local-storage' 34import { getStoredTheater } from '../../../assets/player/peertube-player-local-storage'
35import { 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 () {