I have an array of videos urls, and I'm trying to change the source url video from a clickable list, but is imposibel. I can see in the html elemnts source that the url changed but it doesn't reflect it in the player and keep playing the first video only.
HTML:
<ng-container *ngFor="let trailer of gameTrailer.results; let i=index">
<div class="carousel" (click)="getIndexTrailer(i)">
{{ trailer.name }}
I have an array of videos urls, and I'm trying to change the source url video from a clickable list, but is imposibel. I can see in the html elemnts source that the url changed but it doesn't reflect it in the player and keep playing the first video only.
HTML:
<ng-container *ngFor="let trailer of gameTrailer.results; let i=index"> <div class="carousel" (click)="getIndexTrailer(i)"> {{ trailer.name }}
TS: getIndexTrailer(i: number): void{ this.indexTrailer = i; }