Packagecom.adobe.rtc.collaboration
Classpublic class WebcamSubscriber
InheritanceWebcamSubscriber Inheritance mx.core.UIComponent
ImplementsISessionSubscriber

WebcamSubscriber is the foundation class for receiving and displaying webcam video in a meeting room. By default, WebcamSubscriber simply subscribes to StreamManager notifications and plays all webcam video present in the room. It can also accept an array of userIDs which restricts the list of publishers that can publish to this subscriber. Note that this is a lower level component aimed at making the display of one or more webcam videos simple. For a higher-level control with UI controls, see com.adobe.rtc.pods.WebCamera.

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.

Starting and stopping webcam video in a room
   <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

com.adobe.rtc.collaboration.WebcamSubscriber
com.adobe.rtc.pods.WebCamera
com.adobe.rtc.sharedManagers.StreamManager
com.adobe.rtc.sharedManagers.descriptors.StreamDescriptor


Public Properties
 PropertyDefined 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
  deblocking : int
Indicates the type of filter applied to decoded video as part of post-processing.
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
  height : Number
WebcamSubscriber
  id : String
WebcamSubscriber
  isSynchronized : Boolean
[read-only] Returns whether or not the component is synchronized.
WebcamSubscriber
  measuredHeight : Number
[read-only]
WebcamSubscriber
  measuredWidth : Number
[read-only]
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
  width : Number
WebcamSubscriber
Public Methods
 MethodDefined by
  
Constructor
WebcamSubscriber
  
close():void
Disposes of all listeners to the network and framework classes and assures the proper garbage collection of the component.
WebcamSubscriber
  
getNetStream(p_streamPublisherID:String):NetStreamInfo
Gets the StreamInfo of the stream published by the .
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
  
move(p_x:Number, p_y:Number):void
WebcamSubscriber
  
playStream(p_streamPublisherID:String):void
Plays the stream with the given stream type and stream's publisher ID
WebcamSubscriber
  
setActualSize(p_w:Number, p_h:Number):void
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
Events
 EventSummaryDefined 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
Property detail
accessModelproperty
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
connectSessionproperty 
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.

Implementation
    public function get connectSession():IConnectSession
    public function set connectSession(value:IConnectSession):void
deblockingproperty 
deblocking:int  [read-write]

Indicates the type of filter applied to decoded video as part of post-processing. The default value is 0, which lets the video compressor apply a deblocking filter as needed. visit http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/media/Video.html#deblocking for more info. We currently allow only one deblocking value for all video streams on subscriber.

Implementation
    public function get deblocking():int
    public function set deblocking(value:int):void
displayUserBarsproperty 
public var displayUserBars:Boolean = true

Determines whether the user bar above video streams is displayed. By default, the user bar is displayed (true).

groupNameproperty 
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.

Implementation
    public function get groupName():String
    public function set groupName(value:String):void
heightproperty 
height:Number  [read-write]Implementation
    public function get height():Number
    public function set height(value:Number):void
idproperty 
id:String  [read-write]Implementation
    public function get id():String
    public function set id(value:String):void
isSynchronizedproperty 
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
measuredHeightproperty 
measuredHeight:Number  [read-only]Implementation
    public function get measuredHeight():Number
measuredWidthproperty 
measuredWidth:Number  [read-only]Implementation
    public function get measuredWidth():Number
publisherIDsproperty 
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.

Implementation
    public function get publisherIDs():Array
    public function set publisherIDs(value:Array):void
publishModelproperty 
publishModel:int  [read-write]

The role required for this component to publish to the group specified by groupName.

Implementation
    public function get publishModel():int
    public function set publishModel(value:int):void
sharedIDproperty 
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.

Implementation
    public function get sharedID():String
    public function set sharedID(value:String):void
streamCountproperty 
public var streamCount:int = 0

[read-only] Returns the number of streams currently displayed by the subscriber.

webcamPublisherproperty 
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
widthproperty 
width:Number  [read-write]Implementation
    public function get width():Number
    public function set width(value:Number):void
Constructor detail
WebcamSubscriber()constructor
public function WebcamSubscriber()

Constructor

Method detail
close()method
public function close():void

Disposes of all listeners to the network and framework classes and assures the proper garbage collection of the component.

getNetStream()method 
public function getNetStream(p_streamPublisherID:String):NetStreamInfo

Gets the StreamInfo of the stream published by the .

Parameters
p_streamPublisherID:String

Returns
NetStreamInfo
getNodeConfiguration()method 
public function getNodeConfiguration():NodeConfiguration

Gets the NodeConfiguration on a specific camera stream group.

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

Returns the role of a given user for video streams within this component's group.

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

Returns
int
move()method 
public override function move(p_x:Number, p_y:Number):voidParameters
p_x:Number
 
p_y:Number
playStream()method 
public function playStream(p_streamPublisherID:String):void

Plays the stream with the given stream type and stream's publisher ID

Parameters
p_streamPublisherID:String — The stream publisher's ID.
setActualSize()method 
public override function setActualSize(p_w:Number, p_h:Number):voidParameters
p_w:Number
 
p_h:Number
setNodeConfiguration()method 
public function setNodeConfiguration(p_nodeConfiguration:NodeConfiguration):void

Sets the NodeConfiguration.

Parameters
p_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.

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.
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.

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

Dispatched when a webcam stream has its native width or height change.

numberOfStreamsChangeevent  
Event object type: flash.events.Event

Dispatched when the number of webcam streams displayed by the component changes.

streamChangeevent  
Event object type: com.adobe.rtc.events.UserEvent

Dispatched when a stream is changed.

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

Dispatched when a webcam stream is deleted and is no longer displayed by this component.

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

Dispatched when a webcam stream is paused.

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

Dispatched when a new webcam stream is received by this 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.

userBootedevent  
Event object type: com.adobe.rtc.events.UserEvent

Dispatched when a webcam is closed.

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/WebcamSubscriber.html