player: any
playerElement: HTMLVideoElement
+ theaterEnabled = false
userRating: UserVideoRateType = null
video: VideoDetails = null
descriptionLoading = false
playlistVideos: Video[] = []
playlistPagination: ComponentPagination = {
currentPage: 1,
- itemsPerPage: 10,
+ itemsPerPage: 30,
totalItems: null
}
noPlaylistVideos = false
}
private loadPlaylistElements (redirectToFirst = false) {
- this.videoService.getPlaylistVideos(this.playlist.id, this.playlistPagination)
+ this.videoService.getPlaylistVideos(this.playlist.uuid, this.playlistPagination)
.subscribe(({ totalVideos, videos }) => {
this.playlistVideos = this.playlistVideos.concat(videos)
this.playlistPagination.totalItems = totalVideos
this.zone.runOutsideAngular(async () => {
this.player = await PeertubePlayerManager.initialize(mode, options)
+ this.theaterEnabled = this.player.theaterEnabled
+
this.player.on('customError', ({ err }: { err: any }) => this.handleError(err))
this.player.on('timeupdate', () => {
this.zone.run(() => this.navigateToNextPlaylistVideo())
}
})
+
+ this.player.on('theaterChange', (_: any, enabled: boolean) => {
+ this.zone.run(() => this.theaterEnabled = enabled)
+ })
})
this.setVideoDescriptionHTML()