Change ads directory name & add iframe-tracker directive
This commit is contained in:
parent
bec9ff6c0d
commit
45f9057490
9 changed files with 80 additions and 14 deletions
|
|
@ -1,7 +1,6 @@
|
|||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||
|
||||
<div class="conteneur">
|
||||
<iframe [src]=safeUrl allowfullscreen></iframe>
|
||||
<iframe appIframeTracker [src]=safeUrl allowfullscreen (iframeClick)="onIframeClick(this.video.url)"></iframe><br/>
|
||||
<span>{{video.title}}</span>
|
||||
<button mat-icon-button (click)="onAdd()">
|
||||
<mat-icon > add_circle </mat-icon>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,12 @@
|
|||
import {
|
||||
Component,
|
||||
ElementRef,
|
||||
EventEmitter,
|
||||
HostListener,
|
||||
Input,
|
||||
OnInit,
|
||||
Output,
|
||||
Renderer2,
|
||||
ViewChild
|
||||
} from '@angular/core';
|
||||
import {VideoUrlService} from "../../../utils/services/videoUrl/video-url.service";
|
||||
import {AddVideoToPlaylistsService} from "../../../utils/services/addVideoToPlaylists/add-video-to-playlists.service";
|
||||
import {Video} from "../../../utils/interfaces/video";
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-video-cell',
|
||||
templateUrl: './video-cell.component.html',
|
||||
|
|
@ -24,20 +17,20 @@ export class VideoCellComponent implements OnInit
|
|||
@Input() video: Video;
|
||||
safeUrl;
|
||||
|
||||
|
||||
constructor( private videoUrlService: VideoUrlService,
|
||||
private addVideoToPlaylistsService: AddVideoToPlaylistsService ) {}
|
||||
|
||||
|
||||
ngOnInit(): void
|
||||
{
|
||||
this.safeUrl = this.videoUrlService.safeUrl(this.video.url);
|
||||
}
|
||||
|
||||
|
||||
onAdd(): void
|
||||
{
|
||||
this.addVideoToPlaylistsService.run(this.video);
|
||||
}
|
||||
|
||||
onIframeClick(videoUrl: string) {
|
||||
console.log("test click iframe "+ videoUrl);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue