I have Adobe Media Server 4, and I am using Flash Professional CS5.5 to create streaming application. For testing I use default Adobe Page where you can insert streamer url and Stream name to connect to streaming source, for overview. It's that page at start up, where you have two blocks of videos, left one to broadcast and right one to see stream.
Here is the AS3 code inside my application:
var bandwidth:int = 0;
var quality:int = 50;
var camera:Camera = Camera.getCamera();
camera.setQuality(bandwidth, quality);
camera.setMode(430,320,15, true);
var video:Video = new Video();
video.attachCamera(camera);
addChild(video);
video.width = 430;
video.height = 320;
var nc:NetConnection = new NetConnection();
nc.connect("rtmp://***");
nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
function netStatusHandler(event:NetStatusEvent😞void{
if (event.info.code == "NetConnection.Connect.Success")
{
label10.text = 'Connected';
var ns:NetStream = new NetStream(nc);
ns.attachCamera(camera);
ns.publish("NewStream1", "live");
}
}
When I run this file I get "Connected" in label10, that means it's connected to rtmp server link.
When I insert this specific rtmp link and NewStream1 ( from ns.publish("NewStream1", "live"); ) inside Adobe Default page, it doesn't work... It connects, but it shows only blank black box.
And when I use that default page to stream, left broadcaster, it works great.
Also, I made my own watcher, and it connect too, but there is no data streaming.
Can someone help me with this, tell me what I am doing wrong?
Or can someone tell me how to test is data from camera sent to server?
Thank you.
