ionic-team / ionic-team/cordova-plugin-ionic-webview
Html can’t load local video on iOS
Open
- Dominant language
- Objective-C
- Stars
- 493
- Forks
- 410
- PR merge metrics
- No merged PRs in 30d
Description
ionic3, webview plugin 4.2.1
Html
```html
```
use fileTransfer plugin download video, get a url like:
```js
file:///var/.../Documents/video.mp4
// also tried toInternalURL()
```
error: Not allowed to load local resource
try
```js
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
Contributor guide
Assessment
This issue has not been assessed yet.