| Package | com.adobe.rtc.collaboration |
| Class | public class AudioSubscriber |
| Inheritance | AudioSubscriber mx.core.UIComponent |
| Implements | ISessionSubscriber |
Like all stream components, AudioSubscriber 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,
thereby 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 subscribe defaults to listening 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>
<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 accessing audio streams for this component's group.
| AudioSubscriber | ||
| connectSession : IConnectSession
The IConnectSession with which this component is associated;
defaults to the first IConnectSession created in the application.
| AudioSubscriber | ||
| 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). | AudioSubscriber | ||
| isSynchronized : Boolean [read-only]
Returns whether or not the component is synchronized.
| AudioSubscriber | ||
| publisherIDs : Array
An array of
userIDs, used for restricting the list of publishers
that this subscriber should play audio for. | AudioSubscriber | ||
| publishModel : int
The role required for this component to publish to the group specified by
groupName. | AudioSubscriber | ||
| sharedID : String
Defines the logical location of the component on the service; typically this assigns the
sharedID of the collectionNode
used by the component. | AudioSubscriber | ||
| streamCount : int = 0
[read-only] returns the number of streams currently displayed by the subscriber.
| AudioSubscriber | ||
| Method | Defined by | ||
|---|---|---|---|
|
Constructor
| AudioSubscriber | ||
|
close():void
Disposes of all listeners to the network and framework classes and is therefore
recommended for proper garbage collection of the component.
| AudioSubscriber | ||
|
Gets the NodeConfiguration on a specific audio stream group.
| AudioSubscriber | ||
|
getUserRole(p_userID:String):int
Returns the role of a given user for audio streams within this component's group.
| AudioSubscriber | ||
|
playStream(p_streamPublisherID:String):void
Plays the audio stream with the given stream
publisherID
| AudioSubscriber | ||
|
setLocalVolume(p_volume:Number, p_streamPublisherID:String = null):void
Sets the volume level of the Stream published by the specific publisher.
| AudioSubscriber | ||
|
setNodeConfiguration(p_nodeConfiguration:NodeConfiguration):void
Sets the NodeConfiguration.
| AudioSubscriber | ||
|
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. | AudioSubscriber | ||
|
subscribe():void
Subscribes to a particular stream.
| AudioSubscriber | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| Dispatched when an audio stream is stopped and will cease playing from the subscriber. | AudioSubscriber | |||
| Dispatched when an audio stream being played by this component is muted. | AudioSubscriber | |||
| Dispatched when a new audio stream is accepted by the subscriber and is about to play. | AudioSubscriber | |||
| 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. | AudioSubscriber | |||
| Dispatched when the current user's role with respect to this component changes. | AudioSubscriber | |||
| accessModel | property |
accessModel:int [read-write]The role value required for accessing 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;
defaults to 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
| 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 play audio for.
If 0-length, all publishers' streams are played.
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.
| AudioSubscriber | () | constructor |
public function AudioSubscriber()Constructor
| close | () | method |
public function close():voidDisposes of all listeners to the network and framework classes and is therefore 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 |
| playStream | () | method |
public function playStream(p_streamPublisherID:String):void
Plays the audio stream with the given stream publisherID
p_streamPublisherID:String — The publisher of the stream.
|
| setLocalVolume | () | method |
public function setLocalVolume(p_volume:Number, p_streamPublisherID:String = null):voidSets the volume level of the Stream published by the specific publisher.
Parametersp_volume:Number — The user ID of the publisher whose stream's volume is set.
|
|
p_streamPublisherID:String (default = null) — The volume, between 0 and 1: 0 for silent 1 for full volume.
|
| 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 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():voidSubscribes to a particular stream.
| streamDelete | event |
com.adobe.rtc.events.StreamEvent
Dispatched when an audio stream is stopped and will cease playing from the subscriber.
| streamPause | event |
com.adobe.rtc.events.StreamEvent
Dispatched when an audio stream being played by this component is muted.
| streamReceive | event |
com.adobe.rtc.events.StreamEvent
Dispatched when a new audio stream is accepted by the subscriber and is about to play.
| 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 current user's role with respect to this 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/AudioSubscriber.html