this.videoCaptionService.listCaptions(videoId)
])
.pipe(
- // If 401, the video is private or blacklisted so redirect to 404
+ // If 401, the video is private or blocked so redirect to 404
catchError(err => this.restExtractor.redirectTo404IfNotFound(err, [ 400, 401, 403, 404 ]))
)
.subscribe(([ video, captionsResult ]) => {
this.playlistService.getVideoPlaylist(playlistId)
.pipe(
- // If 401, the video is private or blacklisted so redirect to 404
+ // If 401, the video is private or blocked so redirect to 404
catchError(err => this.restExtractor.redirectTo404IfNotFound(err, [ 400, 401, 403, 404 ]))
)
.subscribe(playlist => {
}
private autoplayNext () {
- if (this.nextVideoUuid) {
+ if (this.playlist) {
+ this.zone.run(() => this.videoWatchPlaylist.navigateToNextPlaylistVideo())
+ } else if (this.nextVideoUuid) {
this.router.navigate([ '/videos/watch', this.nextVideoUuid ])
}
}
else mode = 'webtorrent'
}
+ // p2p-media-loader needs TextEncoder, try to fallback on WebTorrent
+ if (typeof TextEncoder === 'undefined') {
+ mode = 'webtorrent'
+ }
+
if (mode === 'p2p-media-loader') {
const hlsPlaylist = video.getHlsPlaylist()