guten morgen liebe freunde, ich hab hier meinen video stream progg (läuft über den com server) und möchte da jetzt einen chat einbauen, mit liste wer alles im chat ist (und auch die leute einzelnd ansprechen). am besten ohne die communication components....wie fange ich da jetzt am besten an ?
Code:
// Server IP & Usernamen
var ServerIp:String = "rtmp://localhost/test";
var Username:String = "Test1234";
//broadcast button deactvieren
startstop_pb.enabled = false;
connect_pb.onRelease = function(){
if(this.label == "Connect"){
status_txt.text += "Connecting..." + newline;
this.label = "Disconnect";
nc.connect(ServerIp); //rtmp_txt.text
} else {
status_txt.text += "Disconnecting." + newline;
this.label = "Connect";
nc.close();
}
}
nc = new NetConnection();
nc.onStatus = function(info) {
status_txt.text += "NC.onStatus> info.code: " + info.code + newline;
if (info.code == "NetConnection.Connect.Success") {
status_txt.text = "Connected to " + this.uri + newline;
startstop_pb.enabled = true;
createNetStream(this);
}
}
createNetStream = function(nc){
ns = new NetStream(nc);
ns.onStatus = function(info) {
status_txt.text += "NS.onStatus> info.code: " + info.code + newline;
}
mycam = Camera.get();
//
mycam.setQuality(26500, 0);
//mycam.bandwidth();
mymic = Microphone.get();
mymic.setRate(11);
ns.attachVideo(mycam);
ns.attachAudio(mymic);
myvid.attachVideo(mycam);
}
startstop_pb.onRelease = function(){
if (this.label == "Start Broadcast"){
status_txt.text += "Starting broadcast" + newline;
this.label = "Stop Broadcast";
ns.publish(Username, "live"); // streamname_txt.text
} else {
status_txt.text += "Stopping broadcast" + newline;
this.label = "Start Broadcast";
myvid.attachVideo(null);
myvid.clear();
ns.close();
}
}