Stream
Stream
forks the audio streams of a call to your application in near real-time via websocket. The audio is sent as Web Socket Messages.
Stream
is a background activity, meaning FlexML continues executing subsequent instructions after starting the stream.
Supported Attributes
These attributes can be used to modify Stream
. They are inserted as name-value pairs in the opening tag.
Attribute | Data Type | Description |
---|---|---|
audio_track | string | Determines which tracks to stream. Use either the
|
maxLength | string | The maximum length, in seconds, to stream. |
timestampStart | string |
|
track | string | Determines which tracks to stream. Use either the
|
url required | string | The relative or absolute URL of the WebSocket server. Both |
Starting and Stopping the Stream
You should wrap Stream
in Start tags when opening a stream and in Stop tags to stop the stream, using the name
attribute to identify the stream.
...
<Start>
<Stream url="wss://example.com" name="myStream">
</Start>
...
<Stop>
<Stream name="myStream">
</Stop>
...
If you do not Stop
the Stream
, the Stream
continues until the end of the call.
Custom Parameters
To pass custom key / value pairs to the WebSocket server, use Parameter
.
<Stream>
<Parameter name="First Name" value="John"/>
<Parameter name="Last Name" value="Cleese"/>
</Stream>