| Package | com.adobe.rtc.collaboration |
| Class | public class WebcamSubscriber |
| Inheritance | WebcamSubscriber mx.core.UIComponent |
| Implements | ISessionSubscriber |
Like all stream components, WebcamSubscriber has an API for setting and getting a groupName. This property can be used to create
multiple and separate video groups with different access/publish models, thereby allowing for multiple private conversations.
For a subscriber to listen to a particular video stream from a publisher, both should have the same assigned groupName.
If no groupName is assigned, the publisher defaults to publishing to the public group.
<rtc:AdobeHSAuthenticator
// Deployed applications DO NOT hard code username and password here.
userName="AdobeIDusername@example.com"
password="AdobeIDpassword"
id="auth"/>
<session:ConnectSessionContainer
roomURL="http://connect.acrobat.com/exampleAccount/exampleRoom"
authenticator="{auth}">
<mx:VBox width="100%" height="100%">
<collaboration:WebcamPublisher id="camPub"/>
<collaboration:WebcamSubscriber webcamPublisher="{camPub}"/>
<mx:Button label="Video" toggle="true" id="camButt"
click="(camButt.selected) ? camPub.publish() : camPub.stop()"/>
</mx:VBox>
</session:ConnectSessionContainer>
See also
| Property | Defined by | ||
|---|---|---|---|
| accessModel : int
The role value required for accessing video streams for this component's group.
| WebcamSubscriber | ||
| connectSession : IConnectSession
The IConnectSession with which this component is associated, the default being the first IConnectSession
created in the application.
| WebcamSubscriber | ||
| displayUserBars : Boolean = true
Determines whether the user bar above video streams is displayed.
| WebcamSubscriber | ||
| groupName : String
Components (pods) are assigned to a group via
groupName; if not specified,
the component is assigned to the default, public group (the room at large). | WebcamSubscriber | ||
| isSynchronized : Boolean [read-only]
Returns whether or not the component is synchronized.
| WebcamSubscriber | ||
| publisherIDs : Array
An array of
userIDs, used for restricting the list of publishers
that this subscriber should display videos for. | WebcamSubscriber | ||
| publishModel : int
The role required for this component to publish to the group specified by
groupName. | WebcamSubscriber | ||
| sharedID : String
Defines the logical location of the component on the service; typically this assigns the
sharedID of the collectionNode
used by the component. | WebcamSubscriber | ||
| streamCount : int = 0
[read-only] Returns the number of streams currently displayed by the subscriber.
| WebcamSubscriber | ||
| webcamPublisher : WebcamPublisher
Specifies a WebcamPublisher whose video should be displayed if a local camera video display is desired.
| WebcamSubscriber | ||
| Method | Defined by | ||
|---|---|---|---|
|
Constructor
| WebcamSubscriber | ||
|
close():void
Disposes all listeners to the network and framework classes, and its use is
recommended for proper garbage collection of the component.
| WebcamSubscriber | ||
|
Gets the NodeConfiguration on a specific camera stream group.
| WebcamSubscriber | ||
|
getUserRole(p_userID:String):int
Returns the role of a given user for video streams within this component's group.
| WebcamSubscriber | ||
|
playStream(p_streamPublisherID:String):void
lays the stream with the given stream type and stream's publisher ID
| WebcamSubscriber | ||
|
setNodeConfiguration(p_nodeConfiguration:NodeConfiguration):void
Sets the NodeConfiguration.
| WebcamSubscriber | ||
|
setUserRole(p_userID:String, p_userRole:int):void
Sets the role of a given user for subscribing to the component's group
specified by
groupName. | WebcamSubscriber | ||
|
subscribe():void
Tells the component to begin synchronizing with the service.
| WebcamSubscriber | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| Dispatched when a webcam stream has its native width or height change. | WebcamSubscriber | |||
| Dispatched when the number of webcam streams displayed by the component changes. | WebcamSubscriber | |||
| Dispatched when a stream is changed. | WebcamSubscriber | |||
| Dispatched when a webcam stream is deleted and is no longer displayed by this component. | WebcamSubscriber | |||
| Dispatched when a webcam stream is paused. | WebcamSubscriber | |||
| Dispatched when a new webcam stream is received by this component. | WebcamSubscriber | |||
| 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. | WebcamSubscriber | |||
| Dispatched when a webcam is closed. | WebcamSubscriber | |||
| Dispatched when the user's role with respect to the component changes. | WebcamSubscriber | |||
| accessModel | property |
accessModel:int [read-write]The role value required for accessing video streams for this component's group.
Implementation public function get accessModel():int
public function set accessModel(value:int):void
| connectSession | property |
connectSession:IConnectSession [read-write]
The IConnectSession with which this component is associated, the default being the first IConnectSession
created in the application. Note that this may only be set once before subscribe()
is called; re-sessioning of components is not supported.
public function get connectSession():IConnectSession
public function set connectSession(value:IConnectSession):void
| displayUserBars | property |
public var displayUserBars:Boolean = trueDetermines whether the user bar above video streams is displayed. By default, the user bar is displayed (true).
| groupName | property |
groupName:String [read-write]
Components (pods) are assigned to a group via groupName; if not specified,
the component is assigned to the default, public group (the room at large). Groups are like separate
conversations within the room, but each conversation could employ one or more pods; for example, one
"conversation" may use a web camera, chat, and whiteboard pod, with each pod using different access
and publish models. Users are members of and can only see components within the group they are assigned.
Room hosts can see all the groups and all the members in those groups.
public function get groupName():String
public function set groupName(value:String):void
| isSynchronized | property |
isSynchronized:Boolean [read-only]Returns whether or not the component is synchronized.
This property can be used as the source for data binding.
Implementation public function get isSynchronized():Boolean
| publisherIDs | property |
publisherIDs:Array [read-write]
An array of userIDs, used for restricting the list of publishers
that this subscriber should display videos for.
If the length is zero, all publishers' streams are displayed.
public function get publisherIDs():Array
public function set publisherIDs(value:Array):void
| publishModel | property |
publishModel:int [read-write]
The role required for this component to publish to the group specified by groupName.
public function get publishModel():int
public function set publishModel(value:int):void
| sharedID | property |
sharedID:String [read-write]
Defines the logical location of the component on the service; typically this assigns the sharedID of the collectionNode
used by the component. sharedIDs should be unique within a room if they're expressing two
unique locations. Note that this can only be assigned once before subscribe() is called. For components
with an id property, sharedID defaults to that value.
public function get sharedID():String
public function set sharedID(value:String):void
| streamCount | property |
public var streamCount:int = 0[read-only] Returns the number of streams currently displayed by the subscriber.
| webcamPublisher | property |
webcamPublisher:WebcamPublisher [read-write]Specifies a WebcamPublisher whose video should be displayed if a local camera video display is desired.
Implementation public function get webcamPublisher():WebcamPublisher
public function set webcamPublisher(value:WebcamPublisher):void
| WebcamSubscriber | () | constructor |
public function WebcamSubscriber()Constructor
| close | () | method |
public function close():voidDisposes all listeners to the network and framework classes, and its use is recommended for proper garbage collection of the component.
| getNodeConfiguration | () | method |
public function getNodeConfiguration():NodeConfigurationGets the NodeConfiguration on a specific camera stream group.
ReturnsNodeConfiguration |
| getUserRole | () | method |
public function getUserRole(p_userID:String):intReturns the role of a given user for video streams within this component's group.
Parametersp_userID:String — The user ID of the user whose role we should get.
|
int |
| playStream | () | method |
public function playStream(p_streamPublisherID:String):voidlays the stream with the given stream type and stream's publisher ID
Parametersp_streamPublisherID:String — Publisher of the Stream
|
| setNodeConfiguration | () | method |
public function setNodeConfiguration(p_nodeConfiguration:NodeConfiguration):voidSets the NodeConfiguration.
Parametersp_nodeConfiguration:NodeConfiguration — The node Configuration of the group of Camera Stream.
|
| setUserRole | () | method |
public function setUserRole(p_userID:String, p_userRole:int):void
Sets the role of a given user for subscribing to the component's group
specified by groupName.
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.
|
| subscribe | () | method |
public function subscribe():void
Tells the component to begin synchronizing with the service. For UIComponent-based components such as this one,
this is called automatically upon being added to the displayList.
For "headless" components, this method must be called explicitly.
| dimensionsChange | event |
com.adobe.rtc.events.StreamEvent
Dispatched when a webcam stream has its native width or height change.
| numberOfStreamsChange | event |
flash.events.Event
Dispatched when the number of webcam streams displayed by the component changes.
| streamChange | event |
| streamDelete | event |
com.adobe.rtc.events.StreamEvent
Dispatched when a webcam stream is deleted and is no longer displayed by this component.
| streamPause | event |
| streamReceive | event |
com.adobe.rtc.events.StreamEvent
Dispatched when a new webcam stream is received by this component.
| synchronizationChange | event |
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.
| userBooted | event |
| userRoleChange | event |
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/WebcamSubscriber.html