Question
Number of viewers of live stream
Hello,
I want to display the number of viewers that are watching a video stream on a website... I am using FMS 2, and this is the actionscript of the flash file:
connect_pb.onRelease = function(){
if(this.label == "Start Watching"){
this.label = "Stop Watching";
nc.connect("rtmp:/livecast");
} else {
this.label = "Start Watching";
nc.close();
}
}
nc = new NetConnection();
nc.onStatus = function(info) {
createNetStream(this);
}
createNetStream = function(nc){
ns = new NetStream(nc);
myvid.attachVideo(ns);
ns.play(stream, -1)
}
(it displays the video another user is streaming through his webcam).
How can I add the number of viewers of this video to the flash?
Thanks.
I want to display the number of viewers that are watching a video stream on a website... I am using FMS 2, and this is the actionscript of the flash file:
connect_pb.onRelease = function(){
if(this.label == "Start Watching"){
this.label = "Stop Watching";
nc.connect("rtmp:/livecast");
} else {
this.label = "Start Watching";
nc.close();
}
}
nc = new NetConnection();
nc.onStatus = function(info) {
createNetStream(this);
}
createNetStream = function(nc){
ns = new NetStream(nc);
myvid.attachVideo(ns);
ns.play(stream, -1)
}
(it displays the video another user is streaming through his webcam).
How can I add the number of viewers of this video to the flash?
Thanks.
