Skip to main content
Participant
July 18, 2013
Question

Black screen during video loading

  • July 18, 2013
  • 0 replies
  • 366 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.