• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

StageWebView on iOS crashes when loading local files

New Here ,
Jul 27, 2016 Jul 27, 2016

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

TOPICS
Air beta

Views

704

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 16, 2016 Aug 16, 2016

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 16, 2016 Aug 16, 2016

Copy link to clipboard

Copied

LATEST

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);

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 16, 2016 Aug 16, 2016

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines