commencement de la page watching
This commit is contained in:
parent
fd7322a7bc
commit
ccb33d8aeb
27 changed files with 691 additions and 59 deletions
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue