X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2F%2Bvideos%2F%2Bvideo-watch%2Fshared%2Fplaylist%2Fvideo-watch-playlist.component.ts;h=b442383108dd536363b61e6c4e157910867148a1;hb=a5a79d15427372b581e34ac3999c73fc316699d5;hp=fbf9a368784d066e27558a35080313914c3aef45;hpb=22c777863088f90c7f3f9df613b42952abab856d;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts b/client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts index fbf9a3687..b44238310 100644 --- a/client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts +++ b/client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts @@ -143,6 +143,14 @@ export class VideoWatchPlaylistComponent { this.onPlaylistVideosNearOfBottom(position) } + hasPreviousVideo () { + return !!this.findPlaylistVideo(this.currentPlaylistPosition - 1, 'previous') + } + + hasNextVideo () { + return !!this.findPlaylistVideo(this.currentPlaylistPosition + 1, 'next') + } + navigateToPreviousPlaylistVideo () { const previous = this.findPlaylistVideo(this.currentPlaylistPosition - 1, 'previous') if (!previous) return