PDA

View Full Version : Can't get FLVs to stream


nikodermus
05-07-2009, 03:12 AM
Hey all,

This is my first posting. I'm new to FMS, just signed up for a hosting account on Influxis today. Thanks in advance for your help.

I've posted my flv's to my new account, but can't get them to stream. I'm successfully creating a NetConnection (with 'connected' property showing up as true) without any errors, and creating a couple of streams in it. I'm catching NetStream.Play.Reset and NetStream.Play.Start events, but there's no sound or video coming through. I'm not getting FileNotFound or anything like that.

Connection code:
connection = new NetConnection();
connection.addEventListener(NetStatusEvent.NET_STA TUS, netStatusHandler);
connection.addEventListener(AsyncErrorEvent.ASYNC_ ERROR, asyncErrorHandler);
connection.addEventListener(SecurityErrorEvent.SEC URITY_ERROR, securityErrorHandler);
connection.client = this;
connection.connect(CONNECTION_STR);

Then, once a NetConnection.Connect.Success event is thrown, I pass the NetConnection object to my VideoSprite class:

public function VideoSprite(conn:NetConnection, url:String="", offset:Number=0) {
this.videoURL = url;
this.offset = offset;
this.connection = conn;
connectStream();
}

private function connectStream():void {
stream = new NetStream(connection);
stream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
var newClient:Object = new Object();
stream.client = newClient;
stream.bufferTime = 2;

// newClient.onMetaData = metaDataHandler
video = new Video(); // video is a class variable
video.attachNetStream(stream);
video.x = 0;
video.y = 0;
video.width = videoWidth;
video.height = videoHeight;
addChild(video);
}

public function play():void{
stream.play(videoURL);
}

When I check the stream's bytesLoaded and bytesTotal a full 10 seconds later, they both show up as 0.

I've already emailed Influxis to see if I'm formatting my connection string correctly, and am waiting to hear back.

Also, keep in mind this is in an application that has been working fine with local media files. Any ideas?

Thanks so much!

nikodermus
05-07-2009, 10:49 PM
Got this worked out (my rtmp string was misformatted!). On to other issues now (see my next posting!).