This live has ended.
</div>
+<div i18n class="alert alert-warning" *ngIf="noPlaylistVideoFound">
+ There are no videos available in this playlist.
+</div>
+
<div class="alert alert-danger" *ngIf="video?.blacklisted">
<div class="blocked-label" i18n>This video is blocked.</div>
{{ video.blacklistedReason }}
})
export class VideoAlertComponent {
@Input() video: VideoDetails
+ @Input() noPlaylistVideoFound: boolean
isVideoToTranscode () {
return this.video && this.video.state.id === VideoState.TO_TRANSCODE
<div
- *ngIf="playlist && currentPlaylistPosition" class="playlist"
+ *ngIf="playlist && (currentPlaylistPosition || noPlaylistVideos)" class="playlist"
myInfiniteScroller [onItself]="true" (nearOfBottom)="onPlaylistVideosNearOfBottom()"
>
<div class="playlist-info">
@Input() playlist: VideoPlaylist
@Output() videoFound = new EventEmitter<string>()
+ @Output() noVideoFound = new EventEmitter<void>()
playlistElements: VideoPlaylistElement[] = []
playlistPagination: ComponentPagination = {
autoPlayNextVideoPlaylist: boolean
autoPlayNextVideoPlaylistSwitchText = ''
+
loopPlaylist: boolean
loopPlaylistSwitchText = ''
- noPlaylistVideos = false
+ noPlaylistVideos = false
currentPlaylistPosition: number
constructor (
const firstAvailableVideo = this.playlistElements.find(e => !!e.video)
if (!firstAvailableVideo) {
this.noPlaylistVideos = true
+ this.noVideoFound.emit()
return
}
<img class="placeholder-image" *ngIf="playerPlaceholderImgSrc" [src]="playerPlaceholderImgSrc" alt="Placeholder image" i18n-alt>
</div>
- <my-video-watch-playlist #videoWatchPlaylist [playlist]="playlist" (videoFound)="onPlaylistVideoFound($event)"></my-video-watch-playlist>
+ <my-video-watch-playlist
+ #videoWatchPlaylist [playlist]="playlist"
+ (noVideoFound)="onPlaylistNoVideoFound()" (videoFound)="onPlaylistVideoFound($event)"
+ ></my-video-watch-playlist>
<my-plugin-placeholder pluginId="player-next"></my-plugin-placeholder>
</div>
- <my-video-alert [video]="video"></my-video-alert>
+ <my-video-alert [video]="video" [noPlaylistVideoFound]="noPlaylistVideoFound"></my-video-alert>
<!-- Video information -->
<div *ngIf="video" class="margin-content video-bottom">
playlist: VideoPlaylist = null
remoteServerDown = false
+ noPlaylistVideoFound = false
private nextVideoUUID = ''
private nextVideoTitle = ''
this.loadVideo(videoId)
}
+ onPlaylistNoVideoFound () {
+ this.noPlaylistVideoFound = true
+ }
+
isUserLoggedIn () {
return this.authService.isLoggedIn()
}
private loadPlaylist (playlistId: string) {
if (this.isSameElement(this.playlist, playlistId)) return
+ this.noPlaylistVideoFound = false
+
this.playlistService.getVideoPlaylist(playlistId)
.subscribe({
next: playlist => {