commencement de la page watching

This commit is contained in:
MiharyR 2021-11-21 01:30:53 +01:00
parent fd7322a7bc
commit ccb33d8aeb
27 changed files with 691 additions and 59 deletions

View file

@ -18,13 +18,10 @@
<ng-container matColumnDef="aperçu">
<th mat-header-cell *matHeaderCellDef> Aperçu </th>
<td mat-cell *matCellDef="let video">
<img [src]="video.imageUrl" width="200px" height="100px">
<!--
<iframe appIframeTracker
[src]=videoUrlService.safeUrl(video.videoId)
(iframeClick)="onIframeClick(video)"
allowfullscreen></iframe>
-->
<div class="imgsContainer" (click)="onVideo(video)">
<img class="imgPlay" src="/assets/play.png">
<img class="imgVideo" [src]="video.imageUrl">
</div>
</td>
</ng-container>

View file

@ -19,3 +19,27 @@ input {
width: 35%;
font-size: large;
}
// -------------------------------------------------------
.imgsContainer {
position: relative;
width: 20vw;
height: 15vh;
}
.imgPlay {
position: absolute;
margin-left: 9vw;
width: 3vw;
margin-top: 5vh;
height: 6vh;
padding: 0px 0px 0px 0px;
}
.imgVideo {
border: solid 1px black;
width: 20vw;
height: 15vh;
padding: 0px 0px 0px 0px;
}

View file

@ -8,6 +8,7 @@ import {UserHistoryService} from "../../utils/services/userHistory/userHistory.s
import {MatPaginator} from "@angular/material/paginator";
import {FictitiousVideosService} from "../../../utils/services/fictitiousDatas/fictitiousVideos/fictitious-videos.service";
import {VideoAll} from "../../../utils/interfaces/video";
import {Router} from "@angular/router";
@ -28,7 +29,8 @@ export class PageHistoryUserComponent implements AfterViewInit
private messageService: MessageService,
private fictitiousVideosService: FictitiousVideosService,
public videoUrlService: VideoUrlService,
private userHistoryService: UserHistoryService ) { }
private userHistoryService: UserHistoryService,
private router: Router ) { }
// charge la page
@ -102,12 +104,11 @@ export class PageHistoryUserComponent implements AfterViewInit
*/
}
// Ajoute la date actuelle dans watchedDates.video
onIframeClick(video: VideoAll): void
onVideo(video: VideoAll): void
{
console.log("onIframeClick: " + video.title);
//this.userHistoryService.addVideoToHistoque(video);
const url = '/user/watching/fromHistory/'+video.videoId+'/'+video.source ;
this.router.navigateByUrl(url);
}
}