Hi everyone,
Im facing some troubles with lccs, specifically with Screensharing.
I have an app running and doing screensharing, it's working well and fine. In this app i can have users (with presenter+ roles) sharing their screen (one at a time) and other lccs streams.
But to get this working i had to set some workarounds in the lccs source code.
First, i don't know why, when a user is doing screensharing the ScreenSharingProducer.isPublishing method of other users (who is receiving the stream and not publishing) always returns true. Even when the user who is sharing his screen stops publishing, the method continues returning true, this blocks other user to share their screen, once the method publish of the ScreenSharingProducer checks if there is something being publish.
To get around this, i made a call of ScreenSharingProducer.stop on the handler of the ScreenShareEvent.stoppPlayingScreenShare, and my handler is like this:
protected function stopPlayingScreenShare(event:ScreenShareEvent):void
{
this.screenSharePublisher.stop();
changeToScreenNotBeingPresented();
}
But this did not work, once the lccs code for ScreenSharingProducer.stop() checks if the Addin is launched before set the attribute isPublishing to false.
//Code for ScreenSharingProducer of LCCS
public function stop(p_publisherid:String=null):void
{
if(_outgoingConnection != null && _isLaunched)
{
var props:Object = new Object();
//id?
//LCCS code...
_isLaunched = false;
_isPublishing = false;
}
}
To get this work, i added in the end of the ScreenSharingProducer.stop() method an intruction to set isPublishing to false.
public function stop(p_publisherid:String=null):void
{
if(_outgoingConnection != null && _isLaunched)
{
var props:Object = new Object();
//id?
//LCCS code...
_isLaunched = false;
_isPublishing = false;
}
_isLaunched = false;
_isPublishing = false;
}
I made this workaround and my app is running well, like i sad.
But im not sure if this is a bug or if i missundertood the way LCCS works or im not configuring LCCS in the right way.