clic sur video d'une playlist --> ajout dans l'historique
This commit is contained in:
parent
dab2748079
commit
6839740f50
1 changed files with 10 additions and 0 deletions
|
|
@ -70,6 +70,10 @@ export class VideoListComponent implements OnChanges
|
|||
|
||||
onVideo(video: any): void
|
||||
{
|
||||
this.messageService
|
||||
.put("video/update/"+video._id, {watchedDate: true})
|
||||
.subscribe(ret => this.onVideoCallback(ret), err => this.onVideoCallback(err));
|
||||
|
||||
const params = {
|
||||
videoId: video.videoId,
|
||||
source: video.source,
|
||||
|
|
@ -79,4 +83,10 @@ export class VideoListComponent implements OnChanges
|
|||
this.router.navigate(['/user/watching'], { queryParams: params });
|
||||
}
|
||||
|
||||
|
||||
onVideoCallback(retour: any): void
|
||||
{
|
||||
if(retour.status !== "success") console.log(retour);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue