aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-01-07 14:25:23 +0100
committerChocobozzz <me@florianbigard.com>2022-01-10 10:08:14 +0100
commita5a79d15427372b581e34ac3999c73fc316699d5 (patch)
treead457a2105825462a7dc4e5505bdfdd5aaa82756 /client/src/app/+videos
parent22c777863088f90c7f3f9df613b42952abab856d (diff)
downloadPeerTube-a5a79d15427372b581e34ac3999c73fc316699d5.tar.gz
PeerTube-a5a79d15427372b581e34ac3999c73fc316699d5.tar.zst
PeerTube-a5a79d15427372b581e34ac3999c73fc316699d5.zip
Increase player control bar size
Diffstat (limited to 'client/src/app/+videos')
-rw-r--r--client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts8
-rw-r--r--client/src/app/+videos/+video-watch/video-watch.component.ts11
2 files changed, 19 insertions, 0 deletions
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 {
143 this.onPlaylistVideosNearOfBottom(position) 143 this.onPlaylistVideosNearOfBottom(position)
144 } 144 }
145 145
146 hasPreviousVideo () {
147 return !!this.findPlaylistVideo(this.currentPlaylistPosition - 1, 'previous')
148 }
149
150 hasNextVideo () {
151 return !!this.findPlaylistVideo(this.currentPlaylistPosition + 1, 'next')
152 }
153
146 navigateToPreviousPlaylistVideo () { 154 navigateToPreviousPlaylistVideo () {
147 const previous = this.findPlaylistVideo(this.currentPlaylistPosition - 1, 'previous') 155 const previous = this.findPlaylistVideo(this.currentPlaylistPosition - 1, 'previous')
148 if (!previous) return 156 if (!previous) return
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 d542f243c..d3d04d236 100644
--- a/client/src/app/+videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/+videos/+video-watch/video-watch.component.ts
@@ -474,6 +474,14 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
474 }) 474 })
475 } 475 }
476 476
477 private hasNextVideo () {
478 if (this.playlist) {
479 return this.videoWatchPlaylist.hasNextVideo()
480 }
481
482 return true
483 }
484
477 private playNextVideoInAngularZone () { 485 private playNextVideoInAngularZone () {
478 if (this.playlist) { 486 if (this.playlist) {
479 this.zone.run(() => this.videoWatchPlaylist.navigateToNextPlaylistVideo()) 487 this.zone.run(() => this.videoWatchPlaylist.navigateToNextPlaylistVideo())
@@ -559,6 +567,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
559 autoplay: this.isAutoplay(), 567 autoplay: this.isAutoplay(),
560 p2pEnabled: isP2PEnabled(video, this.serverConfig, loggedInOrAnonymousUser.p2pEnabled), 568 p2pEnabled: isP2PEnabled(video, this.serverConfig, loggedInOrAnonymousUser.p2pEnabled),
561 569
570 hasNextVideo: () => this.hasNextVideo(),
562 nextVideo: () => this.playNextVideoInAngularZone(), 571 nextVideo: () => this.playNextVideoInAngularZone(),
563 572
564 playerElement: this.playerElement, 573 playerElement: this.playerElement,
@@ -615,6 +624,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
615 624
616 // Only set this if we're in a playlist 625 // Only set this if we're in a playlist
617 if (this.playlist) { 626 if (this.playlist) {
627 options.common.hasPreviousVideo = () => this.videoWatchPlaylist.hasPreviousVideo()
628
618 options.common.previousVideo = () => { 629 options.common.previousVideo = () => {
619 this.zone.run(() => this.videoWatchPlaylist.navigateToPreviousPlaylistVideo()) 630 this.zone.run(() => this.videoWatchPlaylist.navigateToPreviousPlaylistVideo())
620 } 631 }