Fixed "previous" button showing when not watching a playlist
This commit is contained in:
parent
33d21a9b47
commit
dfdcbb948a
|
@ -799,10 +799,6 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
|
||||||
common: {
|
common: {
|
||||||
autoplay: this.isAutoplay(),
|
autoplay: this.isAutoplay(),
|
||||||
nextVideo: () => this.zone.run(() => this.autoplayNext()),
|
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,
|
playerElement: this.playerElement,
|
||||||
onPlayerElementChange: (element: HTMLVideoElement) => this.playerElement = element,
|
onPlayerElementChange: (element: HTMLVideoElement) => this.playerElement = element,
|
||||||
|
@ -851,6 +847,11 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Only set this if we're in a playlist
|
||||||
|
if (this.playlist) options.common.previousVideo = () => {
|
||||||
|
this.zone.run(() => this.videoWatchPlaylist.navigateToPreviousPlaylistVideo())
|
||||||
|
}
|
||||||
|
|
||||||
let mode: PlayerMode
|
let mode: PlayerMode
|
||||||
|
|
||||||
if (urlOptions.playerMode) {
|
if (urlOptions.playerMode) {
|
||||||
|
|
Loading…
Reference in New Issue