this.sanitizer.bypassSecurityTrustResourceUrl(url) & WARNING: sanitizing unsafe style value url

https://stackoverflow.com/questions/38593515/warning-sanitizing-unsafe-style-value-url

https://github.com/angular/angular/issues/13849

https://github.com/ionic-team/ionic/issues/7552

import { Pipe, PipeTransform } from '@angular/core';
import {DomSanitizer} from '@angular/platform-browser';
@Pipe({ 
	name: 'trustAsResourceUrl' 
})
export class TrustAsResourceUrlPipe implements PipeTransform {
	constructor(private sanitizer:DomSanitizer){}
	transform(url:string) {
		//let sanitizedUrl = this.sanitizer.bypassSecurityTrustUrl(url);
		//
		let sanitizedUrl = this.sanitizer.bypassSecurityTrustResourceUrl(url);
		return sanitizedUrl;
	}
}


<video id="videoPlay" width="100%" height="auto" webkit-playsinline=""
           playsinline=""
           preload="none" controls="controls" #player  [src]="resourceUrl" poster='{{resourceInfo.coverPath  || "http://appdownload.allcam.com.cn/cover/no_picture.png"  }}'&></video&>

Similar Posts: