Skip to main content
Known Participant
April 7, 2012
Question

Android AIR 3.2 ends videos early, 3.1 works but crashes on Kindle

  • April 7, 2012
  • 10 replies
  • 2985 views

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

                              }

 

                    }

This topic has been closed for replies.

10 replies

confusticate
Participant
April 26, 2012

Hi Phillip,

Were you able to find a solution or workaround to this problem? We have just discovered we have the same problem (video ends early) which is a real hassle as most of our stuff is video based, and we were planning to launch the app really soon!

Cheers,

Amanda.

Known Participant
April 26, 2012

Naw--it's whack.  I tried by adding 1 second to each video, then after a couple dozen I found it wasn't consistent.  I was about to log all the durations... add FIVE seconds to each, and then use my hardwired (logged) values and handle it that way.  Then, I just backed off and decided to use .flv (VP6) videos.  Works fine.  But, still, it's whacked.  You can read more details here (but you won't see a workaround): https://bugbase.adobe.com/index.cfm?event=bug&id=3162442

Do post if you figure anything out!  FWIW, I'm just targetting AIR 3.2 because at least there's a chance Adobe will fix it--where, they can't fix AIR 3.1 crashing on Kindle. 

confusticate
Participant
April 27, 2012

Thanks Phillip - it's really great you posted about it, I really appreciate all the time and hair pulling you have saved me! (Especially since my next step - before I saw your post - was that I too was going to try whacking some extra black video on the end!) Unfortunately, I have no workaround to contribute. It's likely that we'll just re-encode all our videos to FLV. We can't wait for Adobe to release a fix (in fact, there is no official word on a fix date, is there?) and I'm unwilling to add hacky hacks to our video player which might come undone in the next release anyway. Now, to dust off Sorenson Squeeze ...

Cheers,

Amanda.

Colin Holgate
Inspiring
April 7, 2012

I tried both the 3.1 and 3.2 versions, on an Acer Iconia A500 and a Kindle Fire. All four tests worked.

Known Participant
April 7, 2012

Thanks for testing Colin.

You sure the video plays through on the 3.2 version?  I should have put the transcript of the video:

"the safest place to walk is on the sidewalk, if there is a sidewalk use it"

When I play the 3.2 version it skips the ending "...use it"


When I play the 3.1 version it will crash after a few tries (every time you click it starts a new video... so click a few times and it will eventually crash--on Kindle)

I should add, I get this behavior (the last second or two missing) for any video (in AIR 3.2/Android)

Colin Holgate
Inspiring
April 7, 2012

So, it does end early in the 3.2 version, on both the Kindle Fire and the Acer tablet.