[Red5] Simple live broadcast problem
AleAmex
ale_ame at libero.it
Tue Dec 4 10:26:09 PST 2007
Hi,
I'm trying to do my first simple live broadcast but I get a strange problem.
I developed a simple application to make the live broadcast and a very
simple client to see the live stream.
I work with Adobe flash CS3 professional: when i make a perview of my two
flash, with the first one i can broadcast and with the second one I can see
the live streaming.
The problem is if I publish the two swf: running them out of Adobe flash CS3
professional they don't work. The first one seems to broadcast but with the
client I can't see the live.
Both are working in localhost where Red5 is correctly installed.
This is the code of the application to make the live broadcast:
import mx.utils.Delegate;
var nc:NetConnection = new NetConnection();
nc.connect("rtmp://localhost/oflaDemo");
var ns:NetStream = new NetStream(nc);
var cam:Camera = Camera.get();
var mic:Microphone = Microphone.get();
setupCameraMic();
broadcastButton.addEventListener("click", Delegate.create(this,
broadcastClick));
stopButton.addEventListener("click", Delegate.create(this, stopClick));
function broadcastClick():Void{
ns.attachVideo(cam);
ns.attachAudio(mic);
videoContainer.attachVideo(cam);
ns.publish("myLive", "live");
playButton.enabled = false;
stopButton.enabled = true;
}
function stopClick():Void{
ns.close();
videoContainer.attachVideo(null);
videoContainer.clear();
playButton.enabled = true;
stopButton.enabled = false;
}
function setupCameraMic():Void{
cam = Camera.get();
cam.setMode(320, 240, 30);
cam.setQuality(0,100);
mic = Microphone.get();
mic.setRate(44);
}
This is the code of the client:
var nc:NetConnection = new NetConnection();
nc.connect("rtmp://localhost/oflaDemo");
var ns:NetStream = new NetStream(nc);
videoContainer.attachVideo(ns);
ns.play("myLive");
What can be the problem? How they could work in preview and not when
published? :(
Please please help me! :)
--
View this message in context: http://www.nabble.com/Simple-live-broadcast-problem-tf4944830.html#a14156542
Sent from the Red5 - English mailing list archive at Nabble.com.
More information about the Red5
mailing list