return this.authService.isLoggedIn()
}
+ getVideoUrl () {
+ if (!this.video.url) {
+ return this.video.originInstanceUrl + VideoDetails.buildClientUrl(this.video.uuid)
+ }
+ return this.video.url
+ }
+
getVideoTags () {
if (!this.video || Array.isArray(this.video.tags) === false) return []
this.setOpenGraphTags()
this.checkUserRating()
- this.hooks.runAction('action:video-watch.video.loaded', 'video-watch', { videojs })
+ const hookOptions = {
+ videojs,
+ video: this.video,
+ playlist: this.playlist
+ }
+ this.hooks.runAction('action:video-watch.video.loaded', 'video-watch', hookOptions)
}
private async buildPlayer (urlOptions: URLOptions) {
common: {
autoplay: this.isAutoplay(),
nextVideo: () => this.zone.run(() => this.autoplayNext()),
+ previousVideo: () => this.zone.run(() => {
+ // FIXME: Only show if this is a playlist
+ if (this.playlist) this.zone.run(() => this.videoWatchPlaylist.navigateToPreviousPlaylistVideo())
+ }),
playerElement: this.playerElement,
onPlayerElementChange: (element: HTMLVideoElement) => this.playerElement = element,