The Client base class.
More...
#include <client.h>
|
struct | HttpConnectionError |
| The Http Connection Error event is emitted when there is a problem connecting to the millicast backend. More...
|
|
struct | PeerConnectionState |
| This event describes the current state of the Peer Connection. More...
|
|
struct | SignalingError |
| The Signaling Error event is emitted when a message attempted to be sent on the signaling channel is rejected. More...
|
|
struct | StatsEvent |
| The Stats Event that is emitted by the SDK containing the stats report. The stats provide insight into the incoming/audio media and rtp data. More...
|
|
struct | ViewerCount |
| The Viewer Count event emitted by the SDK when the number of viewers for a stream changes. More...
|
|
struct | WebsocketState |
| This event describes the current state of the websocket. More...
|
|
|
virtual Promise< void > | connect (std::optional< ConnectionOptions > &&connection_options)=0 |
| Connect and open a websocket connection with the Millicast platform.
|
|
virtual Promise< void > | connect (JsonData &&data, std::optional< ConnectionOptions > &&connection_options)=0 |
| Connect to the media server directly using the websocket url and the JWT.
|
|
virtual Promise< bool > | is_connected () const =0 |
| is_connected
|
|
virtual Promise< void > | disconnect ()=0 |
| Disconnect from Millicast. The websocket connection to Millicast will no longer be active after disconnect is complete. If the client is currently publishing/subscribing, the SDK will first stop the publishing/subscribing before disconnecting.
|
|
virtual Promise< void > | enable_stats (bool enable)=0 |
| Enable the rtc stats collecting. The stats are collected once the client is either publishing or subscribed.
|
|
virtual | ~ClientBase ()=default |
|
|
static std::list< std::string > | get_supported_video_codecs () |
| get_supported_video_codecs returns the list of the supported video codecs.
|
|
static std::list< std::string > | get_supported_audio_codecs () |
| get_supported_audio_codecs returns the list of the supported audio codecs.
|
|
static void | cleanup () |
| Clean and free the memory of dynamic objects.
|
|
The Client base class.
This is the base class to handle a connection with the Millicast platform.
◆ ConnectionState
The Connection State enum describes the possible states that a network connecting socket can be in. This enum will be used in the WebsocketState and PeerConnectionState events to describe the state of those network mediums.
Enumerator |
---|
IDLE | |
CONNECTING | The initial state of the socket. This state will be entered after graceful close.
|
CONNECTED | The socket is in the process of connecting.
|
RECONNECTING | The socket has now established a connection.
|
DISCONNECTING | The socket has entered reconnection state.
|
FAILED | The socket is now in disconnecting state. The socket has entered a failed state.
|
◆ connect() [1/2]
Connect to the media server directly using the websocket url and the JWT.
- Parameters
-
data | The JSON data returned by the director api. |
- Returns
- Promise object providing asynchronous status.
◆ connect() [2/2]
Connect and open a websocket connection with the Millicast platform.
- Returns
- Promise object providing asynchronous status.
◆ disconnect()
virtual Promise< void > millicast::Client::disconnect |
( |
| ) |
|
|
pure virtual |
Disconnect from Millicast. The websocket connection to Millicast will no longer be active after disconnect is complete. If the client is currently publishing/subscribing, the SDK will first stop the publishing/subscribing before disconnecting.
- Returns
- Promise object providing asynchronous status.
◆ enable_stats()
virtual Promise< void > millicast::Client::enable_stats |
( |
bool |
enable | ) |
|
|
pure virtual |
Enable the rtc stats collecting. The stats are collected once the client is either publishing or subscribed.
- Parameters
-
enable | true to enable the stats, false to disable the stats. |
- Returns
- Promise object providing asynchronous status.
◆ is_connected()
virtual Promise< bool > millicast::Client::is_connected |
( |
| ) |
const |
|
pure virtual |
is_connected
- Returns
- Promise object providing asynchronous status. The completion callback will be invoked with true if connected, and with false if not.
The documentation for this class was generated from the following file: