# Simple NetStream, info but no video

**URL:** <https://forum.kirupa.com/t/simple-netstream-info-but-no-video/235303>\
**Category:** flash\
**Created:** [August 10, 2007, 3:36am UTC](https://forum.kirupa.com/t/simple-netstream-info-but-no-video/235303 "2007-08-10T03:36:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jchambers](https://avatars.discourse-cdn.com/v4/letter/j/c37758/32.png) [@jchambers](https://forum.kirupa.com/u/jchambers)\
**Post date:** [August 10, 2007, 3:36am UTC](https://forum.kirupa.com/t/simple-netstream-info-but-no-video/235303/1 "2007-08-10T03:36:48Z")

</div>

Hello all –

Trying to get the video to show on the stage.

Here is the FLA

```auto
 
import classes.NetConnectionExample;
var videoURL:String = "http://192.168.0.52/stream.flv";
var nc:NetConnectionExample = new NetConnectionExample();
nc.ConnectStream(videoURL);

```

and here is the AS

```auto
 
package classes {
 import flash.display.Sprite;
 import flash.events.NetStatusEvent;
 import flash.media.Video;
 import flash.net.NetConnection;
 import flash.net.NetStream;
 import flash.events.Event;
 
    public class NetConnectionExample extends Sprite {
 
        private function NetStatusHandler(event:NetStatusEvent):void {
            switch (event.info.code) {
                case "NetConnection.Connect.Success":
                    trace(event.info.code);
                    break;
                case "NetStream.Play.StreamNotFound":
                    trace("Stream not found: " + event.info.code);
                    break;
            }
        }
 
        public function ConnectStream(videoURL) {
 
           var connection:NetConnection = new NetConnection();
           connection.connect(null);
 
            var stream:NetStream = new NetStream(connection);
            stream.addEventListener(NetStatusEvent.NET_STATUS, NetStatusHandler);
            stream.client = new CustomClient();
            stream.play(videoURL);
 
            var video:Video = new Video();
            video.x = 10;
            video.y = 10;
            video.attachNetStream(stream);
            addChild(video);
 
        }
 }
}
 
 
class CustomClient {
 
    public function onMetaData(info:Object):void {
        trace("metadata: duration=" + info.duration + " width=" + info.width + " height=" + info.height + " framerate=" + info.framerate);
    }
 
    public function onCuePoint(info:Object):void {
        trace("cuepoint: time=" + info.time + " name=" + info.name + " type=" + info.type);
    }
 
}

```

I am getting the video MetaData info returned but the video does not show on the stage?

_[COLOR=dimgray]metadata: duration=479.597 width=368 height=246 framerate=29.970029970029966[/COLOR]_

Any ideas as to what I am doing wrong?

Thank you,  
Jon
