Packagecom.adobe.rtc.sharedManagers
Classpublic class StreamManager
InheritanceStreamManager Inheritance flash.events.EventDispatcher
ImplementsISessionSubscriber

One of the "4 pillars" of a room, the StreamManager represents the shared model for files available for client download. It expresses a variety of methods for other components to access, modify, or publish specific audio and video streams. StreamManager uses StreamDescriptors as control metadata to represent the available streams. Streams themselves may be published, modified, and subscribed to through Audio/WebcamSubscriber and Audio/WebcamPublisher (in general those classes are an easier interface for this achieving this functionality).

The StreamManager keep Streams in "groups" representing the type of Stream (for example, Webcam, VOIP) with permissions settable on a per-group basis. By default, only users with a publisher role and higher may publish a stream and users with a viewer role and higher are able to subscribe.

Most of the API's have a p_groupName parameter that identifies the group to which a set of streams belong. Each stream group has a set of four nodes associated with themselves (each node identifying a type of stream like Webcam , VOIP, etc) There is a default group of streams if the groupName is null, and any new group that is created creates these set of four streams for that group. Grouping streams by a group name helps identify multiple camera, voip, screenshare streams with different configurations as well as support multiple rooms where each room has a unique set of streams. One user can publish only one specific stream type within a group.

Each IConnectSession handles creation/setup of its own StreamManager instance. Use an IConnectSession's streamManager property to access it.

See also

com.adobe.rtc.sharedManagers.descriptors.StreamDescriptor
com.adobe.rtc.collaboration.AudioPublisher
com.adobe.rtc.collaboration.AudioSubscriber
com.adobe.rtc.collaboration.WebcamPublisher
com.adobe.rtc.collaboration.WebcamSubscriber
com.adobe.rtc.events.StreamEvent
com.adobe.rtc.session.IConnectSession


Public Properties
 PropertyDefined by
  connectSession : IConnectSession
(Read Only) Specifies the IConnectSession to which this manager is assigned.
StreamManager
  isSynchronized : Boolean
[read-only] Returns true if the model is synchronized.
StreamManager
  screenSharingSettings : Object
StreamManager
  sharedID : String
StreamManager
Public Methods
 MethodDefined by
  
Constructor.
StreamManager
  
canUserConfigure(p_userID:String, p_streamType:String, p_groupName:String = null):Boolean
Whether or not a specified user may adjust roles or permissions for a given stream type.
StreamManager
  
canUserPublish(p_userID:String, p_streamType:String, p_groupName:String = null):Boolean
Whether or not a specified user may publish streams of a given stream type.
StreamManager
  
changeSizeStream(p_streamType:String, p_nativeWidth:Number = 0, p_nativeHeight:Number = 0, p_streamPublisherID:String = null, p_groupName:String = null):void
Changes a video stream's width and height.
StreamManager
  
changeVolume(p_streamType:String, p_volume:Number = 0, p_streamPublisherID:String = null, p_groupName:String = null):void
Changes the audio stream volume based on type, volume, and publisher ID.
StreamManager
  
createGroup(p_groupName:String):void
Creates a new group, and all the nodes associated with it
StreamManager
  
createStream(p_streamDescriptor:StreamDescriptor):void
Initiates a new stream of a given type from the current client or else requests another user to begin publishing.
StreamManager
  
deleteStream(p_streamType:String, p_streamPublisherID:String, p_groupName:String = null):void
Deletes the streamDescriptor with the specified type and publisher ID and thereby indicates that the associated stream will stop publishing.
StreamManager
  
getGroupNames():Array
Returns all the group names.
StreamManager
  
getNodeConfiguration(p_streamType:String, p_groupName:String = null):NodeConfiguration
Gets the NodeConfiguration on a specific stream node (for example Audio or Camera) within a group.
StreamManager
  
getStreamDescriptor(p_streamType:String, p_streamPublisherID:String, p_groupName:String = null):StreamDescriptor
Queries a streamDescriptor based on its type and unique ID.
StreamManager
  
getStreamDescriptors(p_groupName:String = null):Array
Queries all descriptors within a any group
StreamManager
  
getStreamsForPublisher(p_streamPublisherID:String, p_streamType:String = null, p_groupName:String = null):Array
Returns all streams published by the user specified.
StreamManager
  
getStreamsOfType(p_streamType:String, p_groupName:String = null):Object
Gets all streamDescriptors of a particular type.
StreamManager
  
getUserRole(p_userID:String, p_streamType:String, p_groupName:String = null):int
Gets the role of the specified user for a particular type of stream.
StreamManager
  
isGroupDefined(p_groupName:String):Boolean
Returns true if the group is defined; otherwise, it returns false.
StreamManager
  
muteStream(p_streamType:String, p_state:Boolean = false, p_streamPublisherID:String = null, p_groupName:String = null):void
Mutes an audio stream based on type, state (muted or non muted), and publisher ID.
StreamManager
  
pauseStream(p_streamType:String, p_state:Boolean = false, p_streamPublisherID:String = null, p_groupName:String = null):void
Pauses a video stream based on type, state (paused or non paused), and publisher ID.
StreamManager
  
publishStream(p_streamType:String, p_streamPublisherID:String, p_groupName:String = null):void
Publishes the already created streamDescriptor with the given type, streampublisher ID and group name, if any.
StreamManager
  
removeGroup(p_groupName:String):void
Removes a group if it doesn't exist, and the nodes associated with it
StreamManager
  
setNodeConfiguration(p_nodeConfiguration:NodeConfiguration, p_streamType:String = null, p_groupName:String = null):void
Sets the node configuration on a specific stream node such as an audio or camera node within a group, or else it sets it on all nodes.
StreamManager
  
setUserRole(p_userID:String, p_role:int, p_streamType:String, p_groupName:String = null):void
Sets the role of the specified user for a particular type of stream.
StreamManager
Protected Methods
 MethodDefined by
  
initializeGroupModel(p_groupName:String):void
StreamManager
Events
 EventSummaryDefined by
   Dispatched when the aspect ratio of a video stream changes.StreamManager
   Dispatched when the bandwidth settings for a stream change.StreamManager
   Dispatched when the dimensions of a video stream change.StreamManager
   Dispatched when the my role with respect to a stream changes.StreamManager
   Dispatched when a stream is removed from the room.StreamManager
   Dispatched when a stream is paused or muted.StreamManager
   Dispatched when the room recieves a new stream.StreamManager
   Dispatched when the synchronization changes for the camera.StreamManager
   Dispatched when the user's role with respect to a stream changes.StreamManager
   Dispatched when the volume of an audio stream changes.StreamManager
Public Constants
 ConstantDefined by
  AR_LANDSCAPE : String = "landscape"
[static] Constant for specifying a landscape aspect ratio on a video stream.
StreamManager
  AR_PORTRAIT : String = "portrait"
[static] Constant for specifying a portrait aspect ratio on a video stream.
StreamManager
  AR_STANDARD : String = "standard"
[static] Constant for specifying a standard aspect ratio on a video stream.
StreamManager
  AUDIO_STREAM : String = "audio"
[static] Constant for identifying Audio Streams; for example, VOIP streams from a computer microphone.
StreamManager
  CAMERA_STREAM : String = "camera"
[static] Constant for identifying Camera Streams; for example, webcam streams from a computer camera.
StreamManager
  COLLECTION_NAME : String = "AVManager"
[static] The name of the collectionNode used to represent the shared model of the StreamManager.
StreamManager
Property detail
connectSessionproperty
connectSession:IConnectSession  [read-write]

(Read Only) Specifies the IConnectSession to which this manager is assigned.

Implementation
    public function get connectSession():IConnectSession
    public function set connectSession(value:IConnectSession):void
isSynchronizedproperty 
isSynchronized:Boolean  [read-only]

Returns true if the model is synchronized.

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

Implementation
    public function get isSynchronized():Boolean
screenSharingSettingsproperty 
screenSharingSettings:Object  [read-write]Implementation
    public function get screenSharingSettings():Object
    public function set screenSharingSettings(value:Object):void
sharedIDproperty 
sharedID:String  [read-write]Implementation
    public function get sharedID():String
    public function set sharedID(value:String):void
Constructor detail
StreamManager()constructor
public function StreamManager()

Constructor.

Method detail
canUserConfigure()method
public function canUserConfigure(p_userID:String, p_streamType:String, p_groupName:String = null):Boolean

Whether or not a specified user may adjust roles or permissions for a given stream type.

Parameters
p_userID:String — The specified user's userID.
 
p_streamType:String — The type of stream specified by one of StreamManager's stream type constants.
 
p_groupName:String (default = null) — The group name for which the user has the right to configure the nodes. The default is null.

Returns
Boolean — True if the user can configure; false if not.
canUserPublish()method 
public function canUserPublish(p_userID:String, p_streamType:String, p_groupName:String = null):Boolean

Whether or not a specified user may publish streams of a given stream type.

Parameters
p_userID:String — The specified user's userID.
 
p_streamType:String — The type of stream specified by one of StreamManager's stream type constants.
 
p_groupName:String (default = null) — The group name to check to see if the user has a right to publish. The default is null.

Returns
Boolean — true if the user can publish, false if not
changeSizeStream()method 
public function changeSizeStream(p_streamType:String, p_nativeWidth:Number = 0, p_nativeHeight:Number = 0, p_streamPublisherID:String = null, p_groupName:String = null):void

Changes a video stream's width and height.

Parameters
p_streamType:String — The stream type as specified by one of StreamManager's constants.
 
p_nativeWidth:Number (default = 0) — The stream's native width.
 
p_nativeHeight:Number (default = 0) — The stream's native height.
 
p_streamPublisherID:String (default = null) — The userID of the stream's publisher.
 
p_groupName:String (default = null) — The groupName of the stream's group.
changeVolume()method 
public function changeVolume(p_streamType:String, p_volume:Number = 0, p_streamPublisherID:String = null, p_groupName:String = null):void

Changes the audio stream volume based on type, volume, and publisher ID.

Parameters
p_streamType:String — The stream type as specified by one of StreamManager's constants.
 
p_volume:Number (default = 0) — The streams volume on a scale of 0-100.
 
p_streamPublisherID:String (default = null) — The userID of the stream's publisher.
 
p_groupName:String (default = null) — The groupName of the stream's group.
createGroup()method 
public function createGroup(p_groupName:String):void

Creates a new group, and all the nodes associated with it

Parameters
p_groupName:String — The group Name.
createStream()method 
public function createStream(p_streamDescriptor:StreamDescriptor):void

Initiates a new stream of a given type from the current client or else requests another user to begin publishing.

Parameters
p_streamDescriptor:StreamDescriptor — The stream descriptor being published. If it is null, it returns an error.
deleteStream()method 
public function deleteStream(p_streamType:String, p_streamPublisherID:String, p_groupName:String = null):void

Deletes the streamDescriptor with the specified type and publisher ID and thereby indicates that the associated stream will stop publishing. A user with an owner role may use this method to cancel another user's attempt to publish a stream.

Parameters
p_streamType:String — The streamDescriptor's type.
 
p_streamPublisherID:String — The streamDescriptor's ID.
 
p_groupName:String (default = null) — The streamDescriptor's group name.
getGroupNames()method 
public function getGroupNames():Array

Returns all the group names.

Returns
Array — An array of group names.
getNodeConfiguration()method 
public function getNodeConfiguration(p_streamType:String, p_groupName:String = null):NodeConfiguration

Gets the NodeConfiguration on a specific stream node (for example Audio or Camera) within a group.

Parameters
p_streamType:String — The type of stream for the node on which we are returning the NodeConfiguration.
 
p_groupName:String (default = null) — The group name for the node on which we are returning the NodeConfiguration. The default is null.

Returns
NodeConfiguration
getStreamDescriptor()method 
public function getStreamDescriptor(p_streamType:String, p_streamPublisherID:String, p_groupName:String = null):StreamDescriptor

Queries a streamDescriptor based on its type and unique ID.

Parameters
p_streamType:String — The stream type as specified by one of StreamManager's constants.
 
p_streamPublisherID:String — The PublisherID of the stream to fetch.
 
p_groupName:String (default = null) — The groupName of the stream's group.

Returns
StreamDescriptor
getStreamDescriptors()method 
public function getStreamDescriptors(p_groupName:String = null):Array

Queries all descriptors within a any group

Parameters
p_groupName:String (default = null) — The groupName of the stream's group.

Returns
Array
getStreamsForPublisher()method 
public function getStreamsForPublisher(p_streamPublisherID:String, p_streamType:String = null, p_groupName:String = null):Array

Returns all streams published by the user specified. If a type is specified, only returns streams of that type.

Parameters
p_streamPublisherID:String — The userID of the desired user.
 
p_streamType:String (default = null) — The stream type which is one of the streamManager constants.
 
p_groupName:String (default = null) — The groupName of the stream's group.

Returns
Array
getStreamsOfType()method 
public function getStreamsOfType(p_streamType:String, p_groupName:String = null):Object

Gets all streamDescriptors of a particular type. These are returned as an Object table with the stream IDs as keys.

Parameters
p_streamType:String — The stream type which is one of the streamManager constants.
 
p_groupName:String (default = null) — The groupName of the stream's group.

Returns
Object
getUserRole()method 
public function getUserRole(p_userID:String, p_streamType:String, p_groupName:String = null):int

Gets the role of the specified user for a particular type of stream.

Parameters
p_userID:String — The specified user's userID.
 
p_streamType:String — The type of stream specified by one of StreamManager's stream type constants.
 
p_groupName:String (default = null) — The group name for which we are getting the user roles. The default is null

Returns
int — int which is the user role value
initializeGroupModel()method 
protected function initializeGroupModel(p_groupName:String):voidParameters
p_groupName:String
isGroupDefined()method 
public function isGroupDefined(p_groupName:String):Boolean

Returns true if the group is defined; otherwise, it returns false.

Parameters
p_groupName:String — The group Name.

Returns
Boolean — true if the group exists
muteStream()method 
public function muteStream(p_streamType:String, p_state:Boolean = false, p_streamPublisherID:String = null, p_groupName:String = null):void

Mutes an audio stream based on type, state (muted or non muted), and publisher ID.

Parameters
p_streamType:String — The stream type which is one of the streamManager constants.
 
p_state:Boolean (default = false) — The stream's state; true for muted or false for unmuted.
 
p_streamPublisherID:String (default = null) — The userID of the stream's publisher.
 
p_groupName:String (default = null) — The groupName of the stream's group.
pauseStream()method 
public function pauseStream(p_streamType:String, p_state:Boolean = false, p_streamPublisherID:String = null, p_groupName:String = null):void

Pauses a video stream based on type, state (paused or non paused), and publisher ID.

Parameters
p_streamType:String — The stream type as specified by one of StreamManager's constants.
 
p_state:Boolean (default = false) — The stream's state; true for muted or false for unmuted.
 
p_streamPublisherID:String (default = null) — The userID of the stream's publisher.
 
p_groupName:String (default = null) — The groupName of the stream's group.
publishStream()method 
public function publishStream(p_streamType:String, p_streamPublisherID:String, p_groupName:String = null):void

Publishes the already created streamDescriptor with the given type, streampublisher ID and group name, if any.

Parameters
p_streamType:String — The streamDescriptor's type.
 
p_streamPublisherID:String — The streamDescriptor's ID.
 
p_groupName:String (default = null) — The streamDescriptor's group name.
removeGroup()method 
public function removeGroup(p_groupName:String):void

Removes a group if it doesn't exist, and the nodes associated with it

Parameters
p_groupName:String — The group Name.
setNodeConfiguration()method 
public function setNodeConfiguration(p_nodeConfiguration:NodeConfiguration, p_streamType:String = null, p_groupName:String = null):void

Sets the node configuration on a specific stream node such as an audio or camera node within a group, or else it sets it on all nodes.

Parameters
p_nodeConfiguration:NodeConfiguration — The NodeConfiguration you want to set on the nodes.
 
p_streamType:String (default = null) — The type of stream specified by one of StreamManager's stream type constants. If it is null, then Nodeconfiguration is set on all stream nodes.
 
p_groupName:String (default = null) — The group name for the node(s) to configure. The default is null.
setUserRole()method 
public function setUserRole(p_userID:String, p_role:int, p_streamType:String, p_groupName:String = null):void

Sets the role of the specified user for a particular type of stream. Only users with an owner role may call this method.

Parameters
p_userID:String — The specified user's userID.
 
p_role:int — The role desired.
 
p_streamType:String — The type of stream specified by one of StreamManager's stream type constants.
 
p_groupName:String (default = null) — The group name on which the user role is being set. The default is null.
Event detail
aspectRatioChangeevent 
Event object type: com.adobe.rtc.events.StreamEvent

Dispatched when the aspect ratio of a video stream changes.

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

Dispatched when the bandwidth settings for a stream change.

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

Dispatched when the dimensions of a video stream change.

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

Dispatched when the my role with respect to a stream changes.

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

Dispatched when a stream is removed from the room.

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

Dispatched when a stream is paused or muted.

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

Dispatched when the room recieves a new stream.

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

Dispatched when the synchronization changes for the camera.

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

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

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

Dispatched when the volume of an audio stream changes.

Constant detail
AR_LANDSCAPEconstant
public static const AR_LANDSCAPE:String = "landscape"

Constant for specifying a landscape aspect ratio on a video stream.

AR_PORTRAITconstant 
public static const AR_PORTRAIT:String = "portrait"

Constant for specifying a portrait aspect ratio on a video stream.

AR_STANDARDconstant 
public static const AR_STANDARD:String = "standard"

Constant for specifying a standard aspect ratio on a video stream.

AUDIO_STREAMconstant 
public static const AUDIO_STREAM:String = "audio"

Constant for identifying Audio Streams; for example, VOIP streams from a computer microphone.

CAMERA_STREAMconstant 
public static const CAMERA_STREAM:String = "camera"

Constant for identifying Camera Streams; for example, webcam streams from a computer camera.

COLLECTION_NAMEconstant 
public static const COLLECTION_NAME:String = "AVManager"

The name of the collectionNode used to represent the shared model of the StreamManager.





 

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/sharedManagers/StreamManager.html