ionic-team / cordova-plugin-wkwebview-engine

Mirror of Apache Cordova wkwebview engine plugin
Apache License 2.0
289 stars 66 forks source link

No access to local files from JS/HTML #63

Open doender opened 8 years ago

doender commented 8 years ago

I'm trying to play local audio files, video files and webworkers (referencing a local JS file) in wkwebview but none of them seem to load. However, local images are shown normally. I get no explicit error messages.

Am I missing some configuration directive?

ghenry22 commented 8 years ago

Where are you loading the files from? Wkwebview can't access any path except the app root

doender commented 8 years ago

For audio for example, I'm using:

<audio src='assets/audio/test.mp3' controls></audio>

where assets is in the www folder.

ghenry22 commented 8 years ago

I was just checking that it was within the www folder as wkwebview cannot access files in other paths. It should be able to access that though I would think, if you look at the network request diagnostics in safari do you see any 404 not founds or similar errors? Once the app is running once attach the safari debug tools and hit refresh so you can monitor a load from scratch to catch any early console output or network request failures.

doender commented 8 years ago

I get the following for an audio file:

image

doender commented 8 years ago

Any update on this? I really like this plugin, as the performance increase for lower end device is quite amazing.

mrameezraja commented 8 years ago

Were anyone was able to fix this issue?