| 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.
<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 | ||
| bandwidth : Number
Bandwidth is the maxmimum bandwidth the video feed can take
given other factors like quality.
| 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
Deprecated Use resolutionFactor.
| WebcamPublisher | ||
| connectSession : IConnectSession
The IConnectSession with which this component is associated; it defaults to the first
IConnectSession created in the application.
| WebcamPublisher | ||
| deblocking : int
Indicates the type of filter applied to decoded video as part of post-processing.
| WebcamPublisher | ||
| fps : uint
Fps is the maximum rate at which the camera can capture data, in frames per second.
| 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
keyFrameInterval is the number of video frames transmitted in full (called keyframes)
instead of being interpolated by the video compression algorithm.
| WebcamPublisher | ||
| multicastWindowDuration : int
Sets the silence timeout of the publisher's microphone.
| WebcamPublisher | ||
| netStreamInfo : NetStreamInfo [read-only]
Returns the NetStreamInfo for the camera stream published by the publisher
| WebcamPublisher | ||
| publishModel : int
The role required for this component to publish to the group specified by
groupName. | WebcamPublisher | ||
| quality : uint
Quality is the required level of picture quality, as determined
by the amount of compression being applied to each video frame.
| WebcamPublisher | ||
| recipientIDs : Array
Array of Recipient UserIDs for camera streams published by this user.
| WebcamPublisher | ||
| resolutionFactor : uint
Specifies the resolution factor of captured data; ResolutionFactor values range from 1 (lowest resolution)
to 10 (highest resolution).
| 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 assures proper garbage collection of the component.
| WebcamPublisher | ||
|
Gets the NodeConfiguration that defines message permissions and storage policies for the current stream group.
| WebcamPublisher | ||
|
getUserRole(p_userID:String):int
Returns the given stream publisher or subscriber's user role within the stream's group.
| WebcamPublisher | ||
|
pause(p_pause:Boolean, p_publisherID:String = null):void
Pauses or unpauses the stream specified by p_publisherID; defaults to the current user's stream.
| WebcamPublisher | ||
|
publish(p_publisherID:String = null):void
Begins publishing the stream for the user identified by
p_publisherID after prompting the user. | WebcamPublisher | ||
|
setNodeConfiguration(p_nodeConfiguration:NodeConfiguration):void
Sets the NodeConfiguration that defines message permissions and storage policies for the current stream group.
| WebcamPublisher | ||
|
setUserRole(p_userID:String, p_userRole:int):void
Sets the user role that enables publishing to the component's group specified by the
groupName. | WebcamPublisher | ||
|
stop(p_publisherID:String = null):void
Stops publishing the stream published by the user identified by p_publisherID; if the ID is null, it 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 user's 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
| bandwidth | property |
bandwidth:Number [read-write]Bandwidth is the maxmimum bandwidth the video feed can take given other factors like quality. Default is RoomManager's current Bandwidth. For more, see bandwidth property in flash.media.Camera The value is in kilobit/sec
Implementation public function get bandwidth():Number
public function set bandwidth(value:Number):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]Deprecated Use resolutionFactor. Specifies the captureHeightWidthFactor settings for the webcamera.
Implementation public function get captureWidthHeightFactor():uint
public function set captureWidthHeightFactor(value:uint):void
| 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
| deblocking | property |
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.
Implementation public function get deblocking():int
public function set deblocking(value:int):void
| fps | property |
fps:uint [read-write]Fps is the maximum rate at which the camera can capture data, in frames per second. The maximum rate possible depends on the capabilities of the camera; this frame rate may not be achieved.
The default value is 6.
public function get fps():uint
public function set fps(value:uint):void
| 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]keyFrameInterval is the number of video frames transmitted in full (called keyframes) instead of being interpolated by the video compression algorithm. A value of 1 means that every frame is a keyframe. The allowed values are 1 through 48.
The default value is 18..
public function get keyframeInterval():uint
public function set keyframeInterval(value:uint):void
| multicastWindowDuration | property |
multicastWindowDuration:int [read-write]Sets the silence timeout of the publisher's microphone.
Implementation public function get multicastWindowDuration():int
public function set multicastWindowDuration(value:int):void
| netStreamInfo | property |
netStreamInfo:NetStreamInfo [read-only]Returns the NetStreamInfo for the camera stream published by the publisher
Implementation public function get netStreamInfo():NetStreamInfo
| 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]Quality is the required level of picture quality, as determined by the amount of compression being applied to each video frame. Acceptable quality values range from 1 (lowest quality, maximum compression) to 100 (highest quality, no compression).
The default value is 70.
public function get quality():uint
public function set quality(value:uint):void
| recipientIDs | property |
recipientIDs:Array [read-write]Array of Recipient UserIDs for camera streams published by this user. Throws an error while setting this property if Private Streaming is not allowed i.e. allowPrivateStreams property is false in StreamManager. Throws an error while setting this property if the Camera Stream for this user is currently published. Stop the stream and then set this property. Set this property to null if you want to broadcast your camera stream to everyone. This is also the default case.
The default value is null.
public function get recipientIDs():Array
public function set recipientIDs(value:Array):void
| resolutionFactor | property |
resolutionFactor:uint [read-write]Specifies the resolution factor of captured data; ResolutionFactor values range from 1 (lowest resolution) to 10 (highest resolution). Resolution factor gets multiplied by the native width and height of captured camera. We provide three native width and height values based on aspect ratios. That width and height when multiplied with this factor, gives the resolution. For higher resolution, use a value like 5.
Implementation public function get resolutionFactor():uint
public function set resolutionFactor(value:uint):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
| WebcamPublisher | () | constructor |
public function WebcamPublisher()Constructor
| close | () | method |
public function close():voidDisposes all listeners to the network and framework classes and assures proper garbage collection of the component.
| getNodeConfiguration | () | method |
public function getNodeConfiguration():NodeConfigurationGets the NodeConfiguration that defines message permissions and storage policies for the current stream group.
ReturnsNodeConfiguration |
| getUserRole | () | method |
public function getUserRole(p_userID:String):intReturns the given stream publisher or subscriber's user role within the stream's group.
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):voidPauses or unpauses the stream specified by p_publisherID; defaults to the current user's stream. Dispatches a notification event that can be used to notify room members that the streams state has changed.
Parametersp_pause:Boolean — True to pause; false to play.
|
|
p_publisherID:String (default = null) — An optional user ID of the user whose stream pause state should change; otherwise, if null,
the current user's stream.
|
| publish | () | method |
public function publish(p_publisherID:String = null):void
Begins publishing the stream for the user identified by p_publisherID after prompting the user.
If the user declines to publish on the first prompt, subsequent attempts to publish invoke a dialog
that allows the user to change their publish settings. If the user accepts, it notifies other users through the StreamManager
of the new audio stream and begins streaming to the room for consumption by participating subscribers.
It may also be optionally used for requesting a remote user of a particular 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 that defines message permissions and storage policies for the current stream group.
Parametersp_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.
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):voidStops publishing the stream published by the user identified by p_publisherID; if the ID is null, it defaults to the current user's stream.
Parametersp_publisherID:String (default = null) — The user ID of the user whose stream should be stopped. Defaults to the
current user. Only a room owner can stop a remote user's stream.
|
| 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