I dont know what is going on, it should work.
The app inspector tells me that stream is played by subscribers, but no video
stream at them.
i use this approach :
main.asc
// mygateway should be read as gateway address
load("netservices.asc");
application.onAppStart = function()
{
this.subscriberList = {};
this.publisherList = {};
this.userObject = new UserObject();
NetServices.setDefaultGatewayUrl(mygateway);
this.gatewayconn = NetServices.createGatewayConnection();
this.gatewayconn.setCredentials("cred1", "cred2");
this.gatewayconn.onStatus = application.gatewayStatus;
this.service = this.gatewayconn.getService("services.Server", this.userObject
);
}
application.onConnect = function(clientObj, id1,id2,id3)
{
if(id3 != undefined)
{
// subscriber login
this.subscriberList[id1] = clientObj;
this.userObject .setProps(clObj);
this.service.checkSub(id1, id2);
}
else
{
// publisher login
this.publisherList[id1] = clientObj;
this.userObject .setProps(clObj);
this.service.checkPub(id1, id2);
}
}
function UserObject()
{
}
function setProps(clObj)
{
this.clientObj = clObj;
}
UserObject.prototype.checkSub_Result=function(_data)
{
if(_data)
{
application.acceptConnection(this.clientObj);
client.call("startPlay", null);
}
else application.rejectConnection(this.clientObj);
}
UserObject.prototype.checkPub_Result=function(_data)
{
if(_data){
application.acceptConnection(this.clientObj);
client.call("startBroadcast", null);
}
else application.rejectConnection(this.clientObj);
}
//
i connect perfectly from the client side :
the workflow is :
1) atempt connection
2) onResult successfull the client is accepted and then i call a metod on its
side to start performing actions.
// on the client side of publisher i have :
cam = new Camera;
cam = Camera.get();
cam.setMode(320, 240, 15);
out_ns = new NetStream(the_nc);
out_ns.publish("s0");
out_ns.attachVideo(pub_cam);
then,
// on the client side of subscriber i have :
in_ns = new NetStream(the_nc);
video_mc.video_ev.attachVideo(in_ns);
in_ns.play("s0");
where the_nc is the network connection and it is in both forms the same except
that subscriber has an additional parameter for knowing if it is subscriber
indeed.
What happens is that video_mc.video_ev is not able tto play anything.
Everything its on his place on client side, i testet them with using a camera
connection to be sure the video_ev is there.( dumb ).
What i can see on the communication app inspector is this :
s0 2 playing live ....
s0 1 publishing ....
so this means everything is connected, but then .., why dont i have the stream
showing up in "video_mc.video_ev", i told u, i attached a camera to
video_mc.video_ev and it showed, but not the remote stream.
Is this a bug of flashcomm or what is it ?