Adobe Flex Coder 0622
Adobe Flex Coder 0622

Reputation: 135

WebStageView Not Loading HTML5 Video embedded in HTML for Adobe Flex

I am working on an Air Application that loads locally stored HTML pages. I am working with the latest version of Adobe Air 4.0 Several of the pages contain HTML5 video tags. When loading the pages, instead of displaying the video "Video Not Supported" is displayed. I have tried to use both StageWebView and StageWebViewsBridge, but at giving me the same error. I don't know if I am not importing the proper package, or if I am loading the StageWebView incorrectly. Any help is appreciated.

Here are the imports. import es.xperiments.media.StageWebViewBridge; import es.xperiments.media.StageWebViewBridgeEvent; import es.xperiments.media.StageWebViewDisk; import es.xperiments.media.StageWebviewDiskEvent; import flash.desktop.NativeApplication; import flash.display.Bitmap; import flash.display.DisplayObject; import flash.display.Loader; import flash.display.Sprite; import flash.display.Stage; import flash.display.StageScaleMode; import flash.events.Event; import flash.events.GestureEvent; import flash.events.MouseEvent; import flash.events.TransformGestureEvent; import flash.filesystem.File; import flash.filesystem.FileMode; import flash.filesystem.FileStream; import flash.geom.Rectangle; import flash.html.HTMLHost; import flash.html.HTMLLoader; import flash.media.StageVideo; import flash.media.StageWebView; import flash.net.*; import flash.net.URLRequest; import flash.system.Capabilities; import flash.text.TextFormat; import flash.ui.Multitouch; import flash.ui.MultitouchInputMode; import flash.utils.ByteArray;

import mx.core.mx_internal;

Here is the StageWebView Code.

var display:String = view.nativePath; //location of html page
var webView: StageWebView = new StageWebView(true);
webView.stage = stage;
webView.viewPort = new Rectangle(0, 0, stage.width, stage.height);
webView.loadURL(display);

Upvotes: 0

Views: 828

Answers (1)

Brian
Brian

Reputation: 3914

Try passing the URL of the video files themselves to webView.loadURL(). See http://forums.adobe.com/thread/982408 for more details.

Upvotes: 1

Related Questions