Dear Adobe,
Would you be so kind to provide code example for using the remote control feature? Because here http://livedocs.adobe.com/labs/acrobatcom/com/adobe/rtc/collaboration/ScreenShareSubscriberComplex.h... methods startControlling() and stopControlling() are not documented.
Thank you!
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
Code sample for ScreenShare controlling. Run a simple subscriber at one end, and code below on a different end to test ScreenShare Controlling.
We would edit the docs to provide more information. Thanks for bringing it to our notice.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
xmlns:rtc="http://ns.adobe.com/rtc"
>
<mx:Script>
<![CDATA[
import com.adobe.rtc.collaboration.ScreenShareSubscriberComplex;
import com.adobe.rtc.events.CollectionNodeEvent;
import com.adobe.rtc.events.ScreenShareEvent;
import com.adobe.rtc.events.StreamEvent;
import mx.events.CollectionEvent;
/**********************************************************
* ADOBE SYSTEMS INCORPORATED
* Copyright [first year code created] Adobe Systems Incorporated
* All Rights Reserved.
* NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the
* terms of the Adobe license agreement accompanying it. ?If you have received this file from a
* source other than Adobe, then your use, modification, or distribution of it requires the prior
* written permission of Adobe.
* *********************************/
// This is the upload part...
//[Embed (source = 'cursor.png')]
//protected var CursorShareClass:Class;
private var sss:ScreenShareSubscriberComplex;
private function init():void{
sss = new ScreenShareSubscriberComplex();
sss.addEventListener(ScreenShareEvent.SCREEN_SHARE_STARTED, onScreenShareStarted);
sss.addEventListener(StreamEvent.STREAM_DELETE, onStreamDelete);
sss.connectSession = cSession;
sss.width = displayArea.width;
sss.height = displayArea.height;
sss.x = 0;
sss.y = 0;
displayArea.addChild(sss);
//var _cursor:DisplayObject = DisplayObject(new CursorShareClass);
//displayArea.addChild(_cursor);
// var sss:ScreenShareSubscriberSprite = new ScreenShareSubscriberSprite();
// sss.connectSession = cSession;
// sss.graphics.drawRect(0, 0, displayArea.width, displayArea.height);
// displayArea.rawChildren.addChild( sss );
}
private function onScreenShareStarted(p_evt:ScreenShareEvent):void {
sss.requestControlling();
}
private function onStreamReceived(p_evt:StreamEvent):void {
sss.requestControlling();
}
private function onStreamDelete(p_evt:StreamEvent):void {
sss.stopControlling();
}
]]>
</mx:Script>
<rtc:AdobeHSAuthenticator id="auth" userName="Your Username" password="Your password"/>
<rtc:ConnectSessionContainer id="cSession" authenticator="{auth}" width="100%" height="100%"
roomURL="Your RoomUrl" backgroundAlpha="0" >
<mx:HBox width="100%" height="100%" id="displayArea" creationComplete="init()"/>
</rtc:ConnectSessionContainer>
</mx:Application>
Views
Replies
Total Likes
Dear Adobe!
Please clarify at least in general - is it possible to control the remote screen with LCCS?
Looking forward for your resonse a lot!
Views
Replies
Total Likes
It is, yes. ScreenShareSubscriber has a startControlling() and
stopControlling() method. Are you hitting a specific problem with the
functionality?
nigel
Views
Replies
Total Likes
Hi,
Code sample for ScreenShare controlling. Run a simple subscriber at one end, and code below on a different end to test ScreenShare Controlling.
We would edit the docs to provide more information. Thanks for bringing it to our notice.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
xmlns:rtc="http://ns.adobe.com/rtc"
>
<mx:Script>
<![CDATA[
import com.adobe.rtc.collaboration.ScreenShareSubscriberComplex;
import com.adobe.rtc.events.CollectionNodeEvent;
import com.adobe.rtc.events.ScreenShareEvent;
import com.adobe.rtc.events.StreamEvent;
import mx.events.CollectionEvent;
/**********************************************************
* ADOBE SYSTEMS INCORPORATED
* Copyright [first year code created] Adobe Systems Incorporated
* All Rights Reserved.
* NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the
* terms of the Adobe license agreement accompanying it. ?If you have received this file from a
* source other than Adobe, then your use, modification, or distribution of it requires the prior
* written permission of Adobe.
* *********************************/
// This is the upload part...
//[Embed (source = 'cursor.png')]
//protected var CursorShareClass:Class;
private var sss:ScreenShareSubscriberComplex;
private function init():void{
sss = new ScreenShareSubscriberComplex();
sss.addEventListener(ScreenShareEvent.SCREEN_SHARE_STARTED, onScreenShareStarted);
sss.addEventListener(StreamEvent.STREAM_DELETE, onStreamDelete);
sss.connectSession = cSession;
sss.width = displayArea.width;
sss.height = displayArea.height;
sss.x = 0;
sss.y = 0;
displayArea.addChild(sss);
//var _cursor:DisplayObject = DisplayObject(new CursorShareClass);
//displayArea.addChild(_cursor);
// var sss:ScreenShareSubscriberSprite = new ScreenShareSubscriberSprite();
// sss.connectSession = cSession;
// sss.graphics.drawRect(0, 0, displayArea.width, displayArea.height);
// displayArea.rawChildren.addChild( sss );
}
private function onScreenShareStarted(p_evt:ScreenShareEvent):void {
sss.requestControlling();
}
private function onStreamReceived(p_evt:StreamEvent):void {
sss.requestControlling();
}
private function onStreamDelete(p_evt:StreamEvent):void {
sss.stopControlling();
}
]]>
</mx:Script>
<rtc:AdobeHSAuthenticator id="auth" userName="Your Username" password="Your password"/>
<rtc:ConnectSessionContainer id="cSession" authenticator="{auth}" width="100%" height="100%"
roomURL="Your RoomUrl" backgroundAlpha="0" >
<mx:HBox width="100%" height="100%" id="displayArea" creationComplete="init()"/>
</rtc:ConnectSessionContainer>
</mx:Application>
Views
Replies
Total Likes
Dear aponnusa,
thank you, your example is working! To eliminate confusions for other users, I think it is better to remove onStreamReceived - it is not used through the code -)
Many thanks!
Views
Replies
Total Likes
Nigel,
it seems that startControlling() method is not working. I used the *undocumented* requestControlling method instead and it worked -)
Views
Replies
Total Likes
Views
Likes
Replies
Views
Like
Replies