Copy link to clipboard
Copied
Using SDK 21 onwards, ios app crashes when stageWebView attempts to load local files. This worked prior to SDK 21. I am working on Windows.
I've tried loading external files and webpages, and that works fine. When loading local images and videos, the app crashes instantly.
Has anyone come across a fix? And for a short term aid, does anyone have suggestions on another way to load local video files using native video player?
Example:
var webView = new StageWebView(); |
webView.stage = this.stage;
webView.viewPort = new Rectangle(0, (stage.stageHeight-videoHeight)/2, videoWidth, videoHeight);
var dir:File = File.applicationDirectory.resolvePath("videoAssets/"+model.videoToPlay);
webView.addEventListener(ErrorEvent.ERROR, traceError);
webView.loadURL(dir.nativePath); // Crashes here
Copy link to clipboard
Copied
Would like to add that I'm running into the exact same problem. Worked fine with airsdk 20, but crashes on 21, 22 and 23beta.
Copy link to clipboard
Copied
Actually I found a fix, that worked for me with air 21 (I haven't tested with later). Adding "file://" to fixed the crashing issue:
eg. webView.loadURL("file://" + dir.nativePath);
Copy link to clipboard
Copied
Hi,
This is a known issue to us and below is the link to the bug logged for the same:
Bug#4180325 - StageWebView makes application crash. iOS Air21+
We are currently looking into it.
Thanks,
Adobe AIR Team