Packagecom.adobe.rtc.collaboration
Classpublic class ScreenSharePublisher
InheritanceScreenSharePublisher Inheritance mx.core.UIComponent
ImplementsISessionSubscriber

ScreenSharePublisher is the component responsible for publishing screen share data to other room members. It acts as an intermediary between the NetStream and StreamManager and publishes screen share StreamDescriptors to the StreamManager so that ScreenShareSubscribers in the room are aware a new stream has been initiated. Use this to start ScreenShare, see screen share example in the SDKApps.

It also provides an facility to do following:

When ScreenSharePublisher is launched, a dialog will appear on the publisher side and ask permission to share user's desktop. Publisher user has opportunity to select following choices:

User can choose above option or he/she can also cancel the screen share. The ScreenSharePublisher has no user interface of its own, but provides a basic API through which any commands concerning publishing screen share should be routed. You can load publisher on stage as your display component through addChild method. By default, only users with role UserRoles.PUBLISHER or greater may publish screen share, and all users with role of greater than UserRoles.VIEWER are able to subsribe to these streams. What is NOT in this feature Ability to control screen during a screen share session is an advanced feature. As of now, ScreenSharePublisher does not allow user to control screen. Here is the example of calling sequence to use ScreenSharePublisher

import com.adobe.rtc.collaboration.ScreenSharePublisher;
  var sspublisher:ScreenSharePublisher = new ScreenSharePublisher();
     //this is optional
  var userlist:ArrayCollection = connectSession.userManager.userCollection;
  var recipientIDs:Array = new Array();
  for(var i:int=0; i<userlist.length; i++){
    recipientIDs.push((userlist.getItemAt(i) as UserDescriptor).userID);
  }
     // this is optional, default is everyone in the room can see the screen share
  sspublisher.recipientIDs = recipientIDs;
     // see APIs section for the options
  sspublisher.quality = DEFAULT_SS_QUALITY;  
  sspublisher.performance = DEFAULT_SS_PERFORMANCE; 
  sspublisher.keyframeInterval = DEFAULT_SS_KFI; 
  sspublisher.fps = DEFAULT_SS_FPS;  
  sspublisher.enableHFSS = DEFAULT_SS_ENABLEHFSS; 
  sspublisher.bandwidth = DEFAULT_SS_BANDWIDTH; 
  sspublisher.publish();
  



Public Properties
 PropertyDefined by
  accessModel : Number
ScreenSharePublisher
  bandwidth : Number
ScreenSharePublisher
  connectSession : IConnectSession
ScreenSharePublisher
  enableHFSS : Boolean
ScreenSharePublisher
  fps : Number
ScreenSharePublisher
  groupName : String
ScreenSharePublisher
  isLaunched : Boolean
[read-only]
ScreenSharePublisher
  isPaused : Boolean
[read-only]
ScreenSharePublisher
  isPublishing : Boolean
[read-only]
ScreenSharePublisher
  isSynchronized : Boolean
[read-only]
ScreenSharePublisher
  keyFrameInterval : Number
ScreenSharePublisher
  performance : Number
ScreenSharePublisher
  playerVersion : Number
ScreenSharePublisher
  publishModel : Number
ScreenSharePublisher
  quality : Number
ScreenSharePublisher
  sharedID : String
ScreenSharePublisher
Public Methods
 MethodDefined by
  
Constructor.
ScreenSharePublisher
  
addinReadyForLC(status:String):void
ScreenSharePublisher
  
addinSharingStoppedForLC(status:String):void
ScreenSharePublisher
  
close():void
TODO: close vs.
ScreenSharePublisher
  
Gets the NodeConfiguration that defines message permissions and storage policies for the current stream group.
ScreenSharePublisher
  
getUserRole(p_userID:String):int
Returns the given stream publisher or subscriber's user role within the stream's group.
ScreenSharePublisher
  
pause(p_pause:Boolean):void
ScreenSharePublisher
  
publish():void
ScreenSharePublisher
  
setNodeConfiguration(p_nodeConfiguration:NodeConfiguration):void
Sets the NodeConfiguration that defines message permissions and storage policies for the current stream group.
ScreenSharePublisher
  
setUserRole(p_userID:String, p_userRole:int):void
Sets the user role that enables publishing to the component's group specified by the groupName.
ScreenSharePublisher
  
stop(p_publisherid:String = null):void
ScreenSharePublisher
  
subscribe():void
methods
ScreenSharePublisher
Protected Methods
 MethodDefined by
  
EVENTS
ScreenSharePublisher
Events
 EventSummaryDefined by
   Dispatched when the jey frame interval of camera changes.ScreenSharePublisher
   Dispatched when the camera is accessed for publishing or is stopped.ScreenSharePublisher
   Dispatched when Adobe Addin failed to launch.ScreenSharePublisher
   Dispatched when the FPS of the camera has changed.ScreenSharePublisher
   Dispatched when the jey frame interval of camera changes.ScreenSharePublisher
   Dispatched when the user's camera publishing state changes.ScreenSharePublisher
   Dispatched when the jey frame interval of camera changes.ScreenSharePublisher
   Dispatched when Adobe Addin is launched.ScreenSharePublisher
   Dispatched when the jey frame interval of camera changes.ScreenSharePublisher
   Dispatched when the quality of the camera has changed.ScreenSharePublisher
   Dispatched when Adobe Addin failed to launch.ScreenSharePublisher
   Dispatched when the current user's webcam stream stops publishing.ScreenSharePublisher
   Dispatched when the current user's webcam stream is paused.ScreenSharePublisher
   Dispatched when the current user's webcam stream is published by the component.ScreenSharePublisher
   Dispatched when the component either loses its connection to the session or regains it and has finished re-synchronizing itself to the rest of the room.ScreenSharePublisher
   Dispatched when the user's role with respect to the component changes.ScreenSharePublisher
Property detail
accessModelproperty
accessModel:Number  [read-write]

Implementation
    public function get accessModel():Number
    public function set accessModel(value:Number):void
bandwidthproperty 
bandwidth:Number  [read-write]

Implementation
    public function get bandwidth():Number
    public function set bandwidth(value:Number):void
connectSessionproperty 
connectSession:IConnectSession  [read-write]

Implementation
    public function get connectSession():IConnectSession
    public function set connectSession(value:IConnectSession):void
enableHFSSproperty 
enableHFSS:Boolean  [read-write]

Implementation
    public function get enableHFSS():Boolean
    public function set enableHFSS(value:Boolean):void
fpsproperty 
fps:Number  [read-write]

Implementation
    public function get fps():Number
    public function set fps(value:Number):void
groupNameproperty 
groupName:String  [read-write]

Implementation
    public function get groupName():String
    public function set groupName(value:String):void
isLaunchedproperty 
isLaunched:Boolean  [read-only]

Implementation
    public function get isLaunched():Boolean
isPausedproperty 
isPaused:Boolean  [read-only]

This property can be used as the source for data binding.

Implementation
    public function get isPaused():Boolean
isPublishingproperty 
isPublishing:Boolean  [read-only]

This property can be used as the source for data binding.

Implementation
    public function get isPublishing():Boolean
isSynchronizedproperty 
isSynchronized:Boolean  [read-only]

Implementation
    public function get isSynchronized():Boolean
keyFrameIntervalproperty 
keyFrameInterval:Number  [read-write]

Implementation
    public function get keyFrameInterval():Number
    public function set keyFrameInterval(value:Number):void
performanceproperty 
performance:Number  [read-write]

Implementation
    public function get performance():Number
    public function set performance(value:Number):void
playerVersionproperty 
playerVersion:Number  [read-write]

Implementation
    public function get playerVersion():Number
    public function set playerVersion(value:Number):void
publishModelproperty 
publishModel:Number  [read-write]

Implementation
    public function get publishModel():Number
    public function set publishModel(value:Number):void
qualityproperty 
quality:Number  [read-write]

Implementation
    public function get quality():Number
    public function set quality(value:Number):void
sharedIDproperty 
sharedID:String  [read-write]

Implementation
    public function get sharedID():String
    public function set sharedID(value:String):void
Constructor detail
ScreenSharePublisher()constructor
public function ScreenSharePublisher()

Constructor. Creates Instance of the ScreenSharePublisher object and set up resources needed for screen sharing.

Method detail
addinReadyForLC()method
public function addinReadyForLC(status:String):void

Parameters
status:String
addinSharingStoppedForLC()method 
public function addinSharingStoppedForLC(status:String):voidParameters
status:String
close()method 
public function close():void

TODO: close vs. stop?

getNodeConfiguration()method 
public function getNodeConfiguration():NodeConfiguration

Gets the NodeConfiguration that defines message permissions and storage policies for the current stream group.

Returns
NodeConfiguration
getUserRole()method 
public function getUserRole(p_userID:String):int

Returns the given stream publisher or subscriber's user role within the stream's group.

Parameters
p_userID:String — The user ID of the user whose role we should get.

Returns
int
onSynchronizationChange()method 
protected function onSynchronizationChange(p_evt:CollectionNodeEvent):void

EVENTS

Parameters
p_evt:CollectionNodeEvent
pause()method 
public function pause(p_pause:Boolean):void

Parameters
p_pause:Boolean
publish()method 
public function publish():void

setNodeConfiguration()method 
public function setNodeConfiguration(p_nodeConfiguration:NodeConfiguration):void

Sets the NodeConfiguration that defines message permissions and storage policies for the current stream group.

Parameters
p_nodeConfiguration:NodeConfiguration — The current stream groups node configuration.
setUserRole()method 
public function setUserRole(p_userID:String, p_userRole:int):void

Sets the user role that enables publishing to the component's group specified by the groupName.

Parameters
p_userID:String — The user ID of the user whose role should be set.
 
p_userRole:int — The role value to assign to the user with this user ID.
stop()method 
public function stop(p_publisherid:String = null):void

Parameters
p_publisherid:String (default = null)
subscribe()method 
public function subscribe():void

methods

Event detail
bandwidthChangedevent 
Event object type: com.adobe.rtc.events.CameraConfigurationEvent

Dispatched when the jey frame interval of camera changes.

changeevent  
Event object type: flash.events.Event

Dispatched when the camera is accessed for publishing or is stopped.

failevent  
Event object type: com.adobe.rtc.events.AddinLauncherEvent

Dispatched when Adobe Addin failed to launch.

fpsChangedevent  
Event object type: com.adobe.rtc.events.CameraConfigurationEvent

Dispatched when the FPS of the camera has changed.

hfssChangedevent  
Event object type: com.adobe.rtc.events.CameraConfigurationEvent

Dispatched when the jey frame interval of camera changes.

isScreenSharePublishingChangedevent  
Event object type: flash.events.Event

Dispatched when the user's camera publishing state changes.

keyFrameIntervalChangedevent  
Event object type: com.adobe.rtc.events.CameraConfigurationEvent

Dispatched when the jey frame interval of camera changes.

launchevent  
Event object type: com.adobe.rtc.events.AddinLauncherEvent

Dispatched when Adobe Addin is launched.

performanceChangedevent  
Event object type: com.adobe.rtc.events.CameraConfigurationEvent

Dispatched when the jey frame interval of camera changes.

qualityChangedevent  
Event object type: com.adobe.rtc.events.CameraConfigurationEvent

Dispatched when the quality of the camera has changed.

stopevent  
Event object type: com.adobe.rtc.events.AddinLauncherEvent

Dispatched when Adobe Addin failed to launch.

streamDeleteevent  
Event object type: com.adobe.rtc.events.StreamEvent

Dispatched when the current user's webcam stream stops publishing.

streamPauseevent  
Event object type: com.adobe.rtc.events.StreamEvent

Dispatched when the current user's webcam stream is paused.

streamReceiveevent  
Event object type: com.adobe.rtc.events.StreamEvent

Dispatched when the current user's webcam stream is published by the component.

synchronizationChangeevent  
Event object type: com.adobe.rtc.events.CollectionNodeEvent

Dispatched when the component either loses its connection to the session or regains it and has finished re-synchronizing itself to the rest of the room.

userRoleChangeevent  
Event object type: com.adobe.rtc.events.CollectionNodeEvent

Dispatched when the user's role with respect to the component changes.





 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/labs/acrobatcom/com/adobe/rtc/collaboration/ScreenSharePublisher.html