I am trusting the URL with.. DomSanitizer as below:
myFunction(videoLoc:any):void {
videoLoc = this.sanitizer.bypassSecurityTrustResourceUrl(videoLoc);
}
but getting an error on console:
GET unsafe:myFunction(https://www.youtube.com/watch?v=c9F5kMUfFKk)
My HTML code is as below:
<tr *ngFor="let fetch of fetchApi.data.featured">
<td>
<video width="320" height="240" controls>
<source src=myFunction({{fetch.video_location}})>
</video>
</td>
</tr>
That is the reason, I could not render my videos on an HTML page. What is the mistake that I am doing?