Android AIR 3.2 ends videos early, 3.1 works but crashes on Kindle
I have a reproducible bug for which I made a VERY simple test set of code that demonstrates the problem.
Using AIR 3.2 with regular Video (not StageVideo) the NetStream gets a "NetStream.Play.Stop" early... AND the video stops playing before the end. Happens on all my devices.
Using AIR 3.1 the video plays through correctly but will very soon crash my Kindle Fire. Maybe my code is whack--but you can download it and see it copied here--it's very plain. Plus, the video is fairly tiny (320x240). I am happy using 3.1 if I have to, but it crashes on Kindle so I'm pretty stuck. Please test this out and suggest any ideas you have.
You can install the apps from here:
http://www.phillipkerman.com/air/VideoTester32.apk
http://www.phillipkerman.com/air/VideoTester31.apk
And download the source from here:
http://www.phillipkerman.com/air/source.zip (remember to modify the -app.xml when publishing to 3.1 or 3.2).
I've also included the relavant code below. Thanks in advance!!!
nc = new NetConnection();
nc.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);
nc.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurityErrorHandler);
nc.connect(null);
//
private function onNetStatus(evt:NetStatusEvent):void {
if (evt.info.code == "NetConnection.Connect.Success" ){
ns = new NetStream(nc);
var client:Object = {};
client.onMetaData = onMetaData;
client.onCuePoint = onCuePoint;
client.onBWDone = onBWDone;
ns.client = client;
ns.addEventListener(NetStatusEvent.NET_STATUS, onStreamStatus);
var video:Video = new Video();
video.smoothing = true;
addChild(video);
video.attachNetStream(ns);
video.x = 200;
video.y = 200;
ns.play(_url);
}
}
protected function onStreamStatus(evt:NetStatusEvent):void{
if( evt.info.code == "NetStream.Play.Stop" ){
//MY DISPATCHER:
//dispatchEvent ( new MyVideoEvent(MyVideoEvent.VIDEO_COMPLETE, true ) );
}
}
