[Webkit-unassigned] [Bug 154916] WKWebView needs feature to allow file:// subresources
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jun 9 03:37:00 PDT 2017
https://bugs.webkit.org/show_bug.cgi?id=154916
--- Comment #19 from volker.graf at cartech-company.com ---
(In reply to volker.graf from comment #18)
> (In reply to Ashley Gullen from comment #16)
> > I wrote about my workarounds using Cordova in this blog post:
> > https://www.scirra.com/blog/ashley/25/hacking-something-useful-out-of-
> > wkwebview
> >
> > It's a huge pain, you have to change all your code that loads resources and
> > then cross-domain issues make it awkward. For example there's flat out no
> > way to play video from a local file with WKWebView, unless you serve it with
> > a local web server. For things like images and small snippets of audio, you
> > can use Cordova to read the local files as ArrayBuffer or Blob.
>
> Well I tried you arraybuffer-Idea .. but it seems that MapBoxGL doesnt't
> like the ArrayBuffer =)
>
> I have to admit that I never managed to get the local Webserver running i
> have not found any documentation concerning the cordova-plugin-webserver
> Plugin ..
>
> Any hints ?
Thanx for the Article again .. I FINALLY managed to mage it work by doing the Following:
fetchLocalFileViaCordovaAsURL("./img/car24.png",
function(url) {
map.loadImage(url, (error, image) => {
if (error) {
alert("Car24 image not loaded");
throw error;
}
map.addImage('car24', image);
console.log("Added car16");
});
},
function() {
});
with the following Plugins installed:
cordova-plugin-compat 1.1.0 "Compat"
cordova-plugin-file 4.3.3 "File"
cordova-plugin-statusbar 2.2.3 "StatusBar"
cordova-plugin-whitelist 1.3.2 "Whitelist"
cordova-plugin-wkwebview-engine 1.1.3 "Cordova WKWebView Engine"
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170609/080dce9b/attachment.html>
More information about the webkit-unassigned
mailing list