Skip to main content
Participant
July 31, 2013
Question

Black screen during video loading

  • July 31, 2013
  • 1 reply
  • 1860 views

Hello everybody!

Firstly, Sorry for my poor English.

I am doing an air for android app, and I have a problem when I try to load a video included in my apk.

When a mobile phone try to load the video, the screen is black for one second.

I would like to know if It is posible to make a preloader or any solution to avoid the black screen.

Here you can see the situation: www.youtube.com/v/KoJ2D2eHknU

And here my code:

var mNetConnection:NetConnection=new NetConnection();
mNetConnection
.connect(null);
var mNetStream:NetStream=new NetStream(mNetConnection);     
video
.attachNetStream(mNetStream);
mNetStream
.client=this;
mNetStream
.bufferTime=0;  
mNetStream
.play("video/angela.f4v");
mNetStream
.addEventListener(NetStatusEvent.NET_STATUS, onNetStreamStatusEvent);

function onNetStreamStatusEvent(event:NetStatusEvent😞void
{
  
if (event.info.code == "NetStream.Play.Start")
  
{
      trace
("NetStream.Play.Start");     
  
}
  
if (event.info.code == "NetStream.Play.Stop")
  
{
      trace
("NetStream.Play.Stop");
  
}
  
if (event.info.code == "NetStream.Play.StreamNotFound")
  
{
      trace
("Video Not Found");     
  
}  
  
if (event.info.code == "NetStream.Buffer.Full")
  
{        
  
}
}

function onMetaData(metadata:Object😞void
{
}

Thank you for your help

This topic has been closed for replies.

1 reply

Participating Frequently
August 1, 2013

Hi,

I am not able to reproduce the issue with sample code shared by you. I tried with AIR 3.8 on Nexus 4(4.2.2)

Could you please share the device and AIR version you are using?

Thanks,

Pranali Jain

Participant
August 1, 2013

Hi and thank you for your answer.

Here you can find my apk file.

https://dl.dropboxusercontent.com/u/30144780/curriculo.apk

I have texted my app in Note 2 (4.1.2), S2 (4.1.2) and htc Desire (2.3) and it is the same in every device.

In my app, I have used AIR 3.2 and 3.8, with the same issue.

Thank you very much for your help and interest.

Antonino Vara

Participating Frequently
August 2, 2013

Thanks for sharing your app.

Are you talking about the black screen which initially flickers after cliclking on "Espanol" or "English" when you launch the app? If yes, then this is not a video issue as there is no video loading in that part. Also the code shared by you is for video and I tried out that scenario which was working fine.

Is it possible for you to share the sample app reproducing the issue as it would be easier for us to investigate further.

Thanks,

-Pranali