Refused to display 'https://www.youtube.com/watch?v=oKZRsBjQJOs' in a frame because it set 'X-Frame-Options' to 'sameorigin'
问题 I need to place a video from youtube in my website but the URL is a variable, I created a pipe to can put, but don't work. This is my code in HTML file <iframe width="670" height="348" [src]=" video | video" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe> the code of my pipe is this export class VideoPipe implements PipeTransform { constructor (private domSanitizer:DomSanitizer ){ } transform(url: string): any { return this.domSanitizer