| Package | com.adobe.rtc.collaboration |
| Class | public class AudioPublisher |
| Inheritance | AudioPublisher mx.core.UIComponent |
| Implements | ISessionSubscriber |
In order to improve workflow, it provides an API through which to request other users to begin publishing their audio
(publish with an optional parameter). It also listens for remote requests
for the user to begin publishing and prompts the user to begin when needed. The AudioPublisher
has no user interface of its own, but it does provide a basic API through which any commands
concerning publishing VOIP audio should be routed.
Like all stream components, AudioPublisher has an API for setting and getting a groupName.
This property can be used to create multiple VOIP groups, each being separate and having different access/publish models,
allowing for multiple private conversations. For a subscriber to listen to a particular VOIP 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 the role UserRoles.PUBLISHER or greater may publish audio,
and all users with role of greater than UserRoles.VIEWER are able to subscribe 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>
<collaboration:AudioPublisher id="audioPub"/>
<collaboration:AudioSubscriber/>
<mx:Button label="Audio" toggle="true" id="audioButt"
click="(audioButt.selected) ? audioPub.publish() : audioPub.stop()"/>
</mx:VBox>
</session:ConnectSessionContainer>
See also
| Property | Defined by | ||
|---|---|---|---|
| accessModel : int
The role value required for access to audio streams for this component's group.
| AudioPublisher | ||
| connectSession : IConnectSession
The IConnectSession with which this component is associated; it defaults to the first
IConnectSession created in the application.
| AudioPublisher | ||
| gain : Number
The microphone gain that is the amount by which the microphone should multiply the signal before transmitting it.
| AudioPublisher | ||
| 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). | AudioPublisher | ||
| isPaused : Boolean [read-only]
Returns true if my audio is muted; false if not or audio is not there.
| AudioPublisher | ||
| isPublishing : Boolean [read-only]
Returns true if my audio is publishing; false if not.
| AudioPublisher | ||
| isSynchronized : Boolean [read-only]
Returns whether or not the component is synchronized
| AudioPublisher | ||
| microphone : Microphone [read-only]
Returns the Microphone object associated with this publisher.
| AudioPublisher | ||
| publishModel : int
The role required for this component to publish to the group specified by
groupName. | AudioPublisher | ||
| sharedID : String
Defines the logical location of the component on the service; typically this assigns the
sharedID of the collectionNode
used by the component. | AudioPublisher | ||
| silenceLevel : Number
Sets the silence level of the microphone associated with this publisher.
| AudioPublisher | ||
| silenceTimeout : int
Sets the silence timeout of the microphone associated with this publisher.
| AudioPublisher | ||
| useEchoSuppression : Boolean
true if echo suppression is enabled; false otherwise.
| AudioPublisher | ||
| Method | Defined by | ||
|---|---|---|---|
|
Constructor
| AudioPublisher | ||
|
close():void
Disposes all listeners to the network and framework classes, and its use is
recommended for proper garbage collection of the component.
| AudioPublisher | ||
|
Gets the NodeConfiguration on a specific audio stream group.
| AudioPublisher | ||
|
getUserRole(p_userID:String):int
Returns the role of a given user for audio streams within this component's group.
| AudioPublisher | ||
|
pause(p_mute:Boolean = false, p_publisherID:String = null):void
Mutes or unmutes the the VOIP stream of the specified user (or the current user if not specified).
| AudioPublisher | ||
|
publish(p_publisherID:String = null):void
publish() causes the current user or the user specified by p_publisherID (if non-null)
to be prompted to publish VOIP. | AudioPublisher | ||
|
setNodeConfiguration(p_nodeConfiguration:NodeConfiguration):void
Sets the NodeConfiguration.
| AudioPublisher | ||
|
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. | AudioPublisher | ||
|
stop(p_publisherID:String = null):void
Stops publishing the audio VOIP stream for the specified user; if null, it defaults to the current user.
| AudioPublisher | ||
|
subscribe():void
Tells the component to begin synchronizing with the service.
| AudioPublisher | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| Dispatched when the current user's echo suppression is changed. | AudioPublisher | |||
| Dispatched when the current user's gain is changed. | AudioPublisher | |||
| Dispatched when whether a user is publishing his audio or not changes | AudioPublisher | |||
| Dispatched when the current user's silence level is changed. | AudioPublisher | |||
| Dispatched when the current user's audio stream stops publishing. | AudioPublisher | |||
| Dispatched when the current user's audio stream is muted. | AudioPublisher | |||
| Dispatched when the current user is publishing or not | AudioPublisher | |||
| Dispatched when the current user's audio stream is about to be published by the component. | AudioPublisher | |||
| 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. | AudioPublisher | |||
| Dispatched when the user's role with respect to the component changes. | AudioPublisher | |||
| accessModel | property |
accessModel:int [read-write]The role value required for access to audio 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; 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
| gain | property |
gain:Number [read-write]The microphone gain that is the amount by which the microphone should multiply the signal before transmitting it.
This property can be used as the source for data binding.
Implementation public function get gain():Number
public function set gain(value:Number):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 my audio is muted; false if not or audio is not there.
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 my audio 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
| microphone | property |
microphone:Microphone [read-only]Returns the Microphone object associated with this publisher.
Implementation public function get microphone():Microphone
| 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
| silenceLevel | property |
silenceLevel:Number [read-write]Sets the silence level of the microphone associated with this publisher.
This property can be used as the source for data binding.
Implementation public function get silenceLevel():Number
public function set silenceLevel(value:Number):void
| silenceTimeout | property |
silenceTimeout:int [read-write]Sets the silence timeout of the microphone associated with this publisher.
Implementation public function get silenceTimeout():int
public function set silenceTimeout(value:int):void
| useEchoSuppression | property |
useEchoSuppression:Boolean [read-write]true if echo suppression is enabled; false otherwise.
This property can be used as the source for data binding.
Implementation public function get useEchoSuppression():Boolean
public function set useEchoSuppression(value:Boolean):void
| AudioPublisher | () | constructor |
public function AudioPublisher()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 audio stream group.
ReturnsNodeConfiguration |
| getUserRole | () | method |
public function getUserRole(p_userID:String):intReturns the role of a given user for audio streams within this component's group.
Parametersp_userID:String — The user ID of the user whose role we should get.
|
int |
| pause | () | method |
public function pause(p_mute:Boolean = false, p_publisherID:String = null):voidMutes or unmutes the the VOIP stream of the specified user (or the current user if not specified). Notifies all users in the room that the stream has been muted or unmuted.
Parametersp_mute:Boolean (default = false) — True to mute the audio; false to unmute.
|
|
p_publisherID:String (default = null) — If null, the current user's audio. If non-null, and the current user is an owner,
the parameter forces the specified user to mute their stream.
|
| publish | () | method |
public function publish(p_publisherID:String = null):void
publish() causes the current user or the user specified by p_publisherID (if non-null)
to be prompted to publish VOIP. If the user accepts, it notifies other users through the StreamManager
of the new audio stream, and begins streaming VOIP into the room for consumption by participating
AudioSubscribers.
p_publisherID:String (default = null) — Defaults to null and therefore the current user. If non-null, the parameter requests
the specified user to begin. Note that only a user with role of owner may request others to publish.
|
See also
| setNodeConfiguration | () | method |
public function setNodeConfiguration(p_nodeConfiguration:NodeConfiguration):voidSets the NodeConfiguration.
Parametersp_nodeConfiguration:NodeConfiguration — The node Configuration of the group of Audio 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):voidStops publishing the audio VOIP stream for the specified user; if null, it defaults to the current user.
Parametersp_publisherID:String (default = null) — The user ID of the user whose audio stream should be stopped. Defaults to the
current user. Only an owner in the room 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.
| echoSuppressionChanged | event |
com.adobe.rtc.events.AudioConfigurationEvent
Dispatched when the current user's echo suppression is changed.
| gainChanged | event |
com.adobe.rtc.events.AudioConfigurationEvent
Dispatched when the current user's gain is changed.
| isAudioPublishing | event |
flash.events.Event
Dispatched when whether a user is publishing his audio or not changes
| silenceLevelChanged | event |
com.adobe.rtc.events.AudioConfigurationEvent
Dispatched when the current user's silence level is changed.
| streamDelete | event |
com.adobe.rtc.events.StreamEvent
Dispatched when the current user's audio stream stops publishing.
| streamPause | event |
com.adobe.rtc.events.StreamEvent
Dispatched when the current user's audio stream is muted.
| streamPublishing | event |
com.adobe.rtc.events.StreamEvent
Dispatched when the current user is publishing or not
| streamReceive | event |
com.adobe.rtc.events.StreamEvent
Dispatched when the current user's audio stream is about to be 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/AudioPublisher.html