[Red5] Could I use standard Flash classes with Red5?
David Temes
dtemes at infoco.es
Thu Dec 20 10:43:32 PST 2007
In many cases the red5 classes just extend the standard classes adding features and functionality. You should not have any problem using the standard classes.
David Temes.
----- Original Message -----
From: Evgeniy Strokin
To: Red5 Users
Sent: Thursday, December 20, 2007 7:26 PM
Subject: [Red5] Could I use standard Flash classes with Red5?
Hello,.. I'm trying to learn Red5. I want to write a simple app. I broadcast video to my server and want to see it back on the same client in separate video controller.
I have such class:
class Publisher extends MovieClip{
private var cam:Camera;
private var mic:Microphone;
private var previewVideo:Video;
private var my_video:Video;
private function Publisher(){
trace("controller");
}
private function onLoad():Void {
trace("onLoad()");
configUi();
}
private function configUi():Void {
// setup cam
cam = Camera.get();
cam.setMode(640, 480, 5);
cam.setQuality(0,100);
trace(cam);
// setup mic
mic = Microphone.get();
var conn:NetConnection = new NetConnection(); // Create connection object.
conn.connect("rtmp://localhost/firstTest"); // Connect to server.
trace(conn.connected);
// setup stream
var publishStream:NetStream = new NetStream(conn); // Open stream within connection.
publishStream.attachAudio(mic); // Capture audio.
publishStream.attachVideo(cam); // Capture video.
publishStream.publish("todays_news"); // Begin broadcasting.
// show it on screen
previewVideo.attachVideo(cam);
/* These lines open a stream to play the video portion of the broadcast inside a Video object named my_video. The audio is played through the standard output device */
var playStream:NetStream = new NetStream(conn);
my_video.attachVideo(playStream); // Specify where to display video.
playStream.play("todays_news"); // play() uses the same name as publish() above.
}
}
I'm trying to use standard classes like NetStream and NetConnection. I'm not able to see any connections on my server.
Should I use only Red5 classes which goes with example apps or I could use standard classes?
------------------------------------------------------------------------------
_______________________________________________
Red5 mailing list
Red5 at osflash.org
http://osflash.org/mailman/listinfo/red5_osflash.org
------------------------------------------------------------------------------
Internal Virus Database is out-of-date.
Checked by AVG Free Edition.
Version: 7.5.503 / Virus Database: 269.17.1/1183 - Release Date: 13/12/2007 9:15
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/red5_osflash.org/attachments/20071220/441e8d87/attachment.html
More information about the Red5
mailing list