if (this.video && this.video.uuid === uuid) return
this.videoService.getVideo(uuid).subscribe(
- video => this.onVideoFetched(video),
+ video => {
+ const startTime = this.route.snapshot.queryParams.start
+ this.onVideoFetched(video, startTime)
+ .catch(err => this.handleError(err))
+ },
error => {
this.videoNotFound = true
)
}
- private async onVideoFetched (video: VideoDetails) {
+ private async onVideoFetched (video: VideoDetails, startTime = 0) {
this.video = video
// Re init attributes
videoDuration: this.video.duration,
enableHotkeys: true,
peertubeLink: false,
- poster: this.video.previewUrl
+ poster: this.video.previewUrl,
+ startTime
})
const self = this