| Package | com.adobe.rtc.collaboration |
| Class | public class WebcamPublisher |
| Inheritance | WebcamPublisher mx.core.UIComponent |
| Implements | ISessionSubscriber |
It also provides an API for the following:
publish with an optional parameter).
Like all stream components, WebcamPublisher has an API for setting and getting a
groupName. This property can be used to create
multiple video groups, each being separate and having different access/publish models,
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 into the public group.
By default, only users with role UserRoles.PUBLISHER or greater may publish webcams, and all users with
role of greater than UserRoles.VIEWER are able to subsribe to these streams.
<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 the group this component is assigned to
| WebcamPublisher | ||
| camera : Camera [read-only]
Returns the camera object associated with this publisher.
| WebcamPublisher | ||
| cameraNameIndex : String
Specifies the index of the current camera within the list of cameras.
| WebcamPublisher | ||
| captureWidthHeightFactor : uint
Specifies the captureHeightWidthFactor settings for ON2 video for the webcamera.
| WebcamPublisher | ||
| connectSession : IConnectSession
The IConnectSession with which this component is associated; it defaults to the first
IConnectSession created in the application.
| WebcamPublisher | ||
| fps : uint
Specifies the fps settings for ON2 video for the webcamera.
| WebcamPublisher | ||
| 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). | WebcamPublisher | ||
| isPaused : Boolean [read-only]
Returns true if the camera is paused; false if not or if there is no stream.
| WebcamPublisher | ||
| isPublishing : Boolean [read-only]
Returns true if the camera is publishing; false if not.
| WebcamPublisher | ||
| isSynchronized : Boolean [read-only]
Returns whether or not the component is synchronized.
| WebcamPublisher | ||
| keyframeInterval : uint
Specifies the keyFrameInterval settings for ON2 video for the webcamera.
| WebcamPublisher | ||
| publishModel : int
The role required for this component to publish to the group specified by
groupName. | WebcamPublisher | ||
| quality : uint
Specifies the quality settings for ON2 video for the webcamera.
| WebcamPublisher | ||
| sharedID : String
Defines the logical location of the component on the service; typically this assigns the
sharedID of the collectionNode
used by the component. | WebcamPublisher | ||
| Method | Defined by | ||
|---|---|---|---|
|
Constructor
| WebcamPublisher | ||
|
close():void
Disposes all listeners to the network and framework classes and
is recommended for proper garbage collection of the component.
| WebcamPublisher | ||
|
Gets the NodeConfiguration on a specific camera stream group.
| WebcamPublisher | ||
|
getUserRole(p_userID:String):int
Returns the role of a given user for video streams, within the group this component is assigned to.
| WebcamPublisher | ||
|
pause(p_pause:Boolean, p_publisherID:String = null):void
Pauses the stream with the given
streamDescriptor. | WebcamPublisher | ||
|
publish(p_publisherID:String = null):void
Begins publishing the webcamera stream after prompting the user.
| WebcamPublisher | ||
|
setNodeConfiguration(p_nodeConfiguration:NodeConfiguration):void
Sets the NodeConfiguration.
| WebcamPublisher | ||
|
setUserRole(p_userID:String, p_userRole:int):void
Sets the role of a given user for publishing to the component's group
specified by
groupName. | WebcamPublisher | ||
|
stop(p_publisherID:String = null):void
Stops the webcam stream specified by
p_publisherID (defaults to the current user's stream). | WebcamPublisher | ||
|
subscribe():void
Tells the component to begin synchronizing with the service.
| WebcamPublisher | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| Dispatched when the width and height capturing factor of camera changes. | WebcamPublisher | |||
| Dispatched when the camera is accessed for publishing or is stopped. | WebcamPublisher | |||
| Dispatched when the fps of the camera has changed. | WebcamPublisher | |||
| Dispatched when the users' camera publishing state changes. | WebcamPublisher | |||
| Dispatched when the jey frame interval of camera changes. | WebcamPublisher | |||
| Dispatched when the quality of the camera has changed. | WebcamPublisher | |||
| Dispatched when the current user's webcam stream stops publishing. | WebcamPublisher | |||
| Dispatched when the current user's webcam stream is paused. | WebcamPublisher | |||
| Dispatched when the current user's webcam stream is published by the component. | WebcamPublisher | |||
| 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. | WebcamPublisher | |||
| Dispatched when the user's role with respect to the component changes. | WebcamPublisher | |||
| accessModel | property |
accessModel:int [read-write]The role value required for accessing video streams, for the group this component is assigned to
Implementation public function get accessModel():int
public function set accessModel(value:int):void
| camera | property |
camera:Camera [read-only]Returns the camera object associated with this publisher.
Implementation public function get camera():Camera
| cameraNameIndex | property |
cameraNameIndex:String [read-write]Specifies the index of the current camera within the list of cameras.
Implementation public function get cameraNameIndex():String
public function set cameraNameIndex(value:String):void
| captureWidthHeightFactor | property |
captureWidthHeightFactor:uint [read-write]Specifies the captureHeightWidthFactor settings for ON2 video for the webcamera.
Implementation public function get captureWidthHeightFactor():uint
public function set captureWidthHeightFactor(value:uint):void
See also
| connectSession | property |
connectSession:IConnectSession [read-write]
The IConnectSession with which this component is associated; it defaults to the first
IConnectSession created in the application. Note that this may only be set once before
subscribe() is called, and re-sessioning of components is not supported.
public function get connectSession():IConnectSession
public function set connectSession(value:IConnectSession):void
| fps | property |
fps:uint [read-write]Specifies the fps settings for ON2 video for the webcamera.
Implementation public function get fps():uint
public function set fps(value:uint):void
See also
| 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
| isPaused | property |
isPaused:Boolean [read-only]Returns true if the camera is paused; false if not or if there is no stream.
This property can be used as the source for data binding.
Implementation public function get isPaused():Boolean
| isPublishing | property |
isPublishing:Boolean [read-only]Returns true if the camera is publishing; false if not.
This property can be used as the source for data binding.
Implementation public function get isPublishing():Boolean
| 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
| keyframeInterval | property |
keyframeInterval:uint [read-write]Specifies the keyFrameInterval settings for ON2 video for the webcamera.
Implementation public function get keyframeInterval():uint
public function set keyframeInterval(value:uint):void
See also
| 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
| quality | property |
quality:uint [read-write]Specifies the quality settings for ON2 video for the webcamera.
Implementation public function get quality():uint
public function set quality(value:uint):void
See also
| 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
| WebcamPublisher | () | constructor |
public function WebcamPublisher()Constructor
| close | () | method |
public function close():voidDisposes all listeners to the network and framework classes and 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 the group this component is assigned to.
Parametersp_userID:String — The user ID of the user whose role we should get.
|
int |
| pause | () | method |
public function pause(p_pause:Boolean, p_publisherID:String = null):void
Pauses the stream with the given streamDescriptor.
p_pause:Boolean |
|
p_publisherID:String (default = null) |
| publish | () | method |
public function publish(p_publisherID:String = null):void
Begins publishing the webcamera stream after prompting the user.
It may also be optionally used for requesting a remote user
to begin publishing (specified by p_publisherID).
p_publisherID:String (default = null) — - if null (default), publishes the current user, otherwise prompts the specified remote user.
|
| 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 publishing 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.
|
| stop | () | method |
public function stop(p_publisherID:String = null):void
Stops the webcam stream specified by p_publisherID (defaults to the current user's stream).
p_publisherID:String (default = null) — Optionally, the userID of the user whose stream should be stopped. Defaults to the current user.
|
| 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.
| captureWidthHeightFactorChanged | event |
com.adobe.rtc.events.CameraConfigurationEvent
Dispatched when the width and height capturing factor of camera changes.
| change | event |
flash.events.Event
Dispatched when the camera is accessed for publishing or is stopped.
| fpsChanged | event |
com.adobe.rtc.events.CameraConfigurationEvent
Dispatched when the fps of the camera has changed.
| isCameraPublishing | event |
| keyFrameIntervalChanged | event |
com.adobe.rtc.events.CameraConfigurationEvent
Dispatched when the jey frame interval of camera changes.
| qualityChanged | event |
com.adobe.rtc.events.CameraConfigurationEvent
Dispatched when the quality of the camera has changed.
| streamDelete | event |
com.adobe.rtc.events.StreamEvent
Dispatched when the current user's webcam stream stops publishing.
| streamPause | event |
com.adobe.rtc.events.StreamEvent
Dispatched when the current user's webcam stream is paused.
| streamReceive | event |
com.adobe.rtc.events.StreamEvent
Dispatched when the current user's webcam stream is published by the 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.
| 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/WebcamPublisher.html