freshplanet / ANE-ImagePicker

Air Native Extension for mobile camera and gallery features (iOS + Android)
Apache License 2.0
80 stars 48 forks source link

How to play video, saved with this extension #22

Open EgorLoskutov opened 10 years ago

EgorLoskutov commented 10 years ago

On callback function we receive url to saved video file, after it we tray to play video with folowing code: mNetConnection = new NetConnection (); mNetConnection.connect (null); mNetStream = new NetStream (mNetConnection); mNetStream.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus, false, 0, true); var customClient:Object = new Object(); mNetStream.client = customClient; mVideo = new Video (rect.width, rect.height); mVideo.smoothing = true; mVideo.attachNetStream(mNetStream); addChild(mVideo); mVideo.x = rect.x + 300; mVideo.y = rect.y + 250; mVideo.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler); if (mNetStream) mNetStream.play("file://"+url); On netStatus got next trace: event.info.code = NetStream.Play.Start event.info.code = NetStream.Play.Failed event.info.code = NetStream.Play.Stop Can you help, please? What we do wrong?