ionic3, webview plugin 4.2.1
Html
<video *ngIf="videoUrl" width="320" height="240" controls>
<source src="{{videoUrl}}" type="video/mp4">
</video>
use fileTransfer plugin download video, get a url like:
file:///var/.../Documents/video.mp4
// also tried toInternalURL()
error: Not allowed to load local resource
try
this.videoUrl = this.win.Ionic.WebView.convertFileSrc(url); // ionic://localhost/_app_file_/var/.../Documents/video.mp4
// or use sanitizer
this.videoUrl = this.sanitizer.bypassSecurityTrustResourceUrl(this.win.Ionic.WebView.convertFileSrc(url));
both error: Failed to load resource: unsupported URL