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,
}
}
+ // Only set this if we're in a playlist
+ if (this.playlist) options.common.previousVideo = () => {
+ this.zone.run(() => this.videoWatchPlaylist.navigateToPreviousPlaylistVideo())
+ }
+
let mode: PlayerMode
if (urlOptions.playerMode) {