StartAudioStreamRequest

Starts streaming audio from the capture device in a Room.


When a request to start the audio streaming is sent, the server returns a list of streams already in progress in the passed Room (if no Room is passed, the last joined one is used). The current client's outgoing stream transmission is then actually started; playback of all incoming streams is also started and the SFSAudioEvent.STREAM_START event is fired. The clients already streaming in the Room are notified that a new stream was started by means of the SFSAudioEvent.STREAM_ADD event.

Outgoing and incoming streams use the system's default playback and capture devices respectively, unless different devices have been selected by means of the captureDevice and playbackDevice setters. Both devices can be changed while the streaming is already in progress. Hot plug/unplug of devices (for example external microphone and/or headphones) is supported.

Constructor

new StartAudioStreamRequest(roomopt, isMutedopt)

Creates a new instance of the StartAudioStreamRequest class.
Pass the instance to the SmartFox#send method to validate and execute the request.
Parameters:
NameTypeAttributesDefaultDescription
roomSFSRoom<optional>
nullThe object representing the Room where to start the audio streaming; if null, the last joined Room is used.
isMutedboolean<optional>
falseIf true, the audio stream is started as muted.