commencement de la 'page search'

This commit is contained in:
MiharyR 2021-10-27 01:48:30 +02:00
parent 5f4ecfc7b3
commit 58d80d1a6b
47 changed files with 889 additions and 84 deletions

View file

@ -0,0 +1,33 @@
import {Component, Input, OnInit} from '@angular/core';
import {VideoUrlService} from "../../../utils/services/videoUrl/video-url.service";
import {PlaylistService} from "../../../utils/services/playlist/playlist.service";
import {Video} from "../../../utils/interfaces/video";
@Component({
selector: 'app-video-cell',
templateUrl: './video-cell.component.html',
styleUrls: ['./video-cell.component.scss']
})
export class VideoCellComponent implements OnInit
{
@Input() video: Video;
safeUrl;
constructor( private videoUrlService: VideoUrlService,
private playlistService: PlaylistService ) {}
ngOnInit(): void
{
this.safeUrl = this.videoUrlService.safeUrl(this.video.url);
}
onAdd(): void
{
this.playlistService.addVideoToPlaylists(this.video)
console.log("onAdd:" + this.video.title);
}
}