The Client base class.
More...
#include <client.h>
|
virtual bool | connect (const std::optional< ConnectionOptions > &connection_options=std::nullopt)=0 |
| Connect and open a websocket connection with the Millicast platform.
|
|
virtual bool | connect (const JsonData &data, const std::optional< ConnectionOptions > &connection_options=std::nullopt)=0 |
| Connect to the media server directly using the websocket url and the JWT.
|
|
virtual bool | is_connected () const =0 |
| is_connected
|
|
virtual bool | 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 void | enable_stats (bool enable)=0 |
| Enable the rtc stats collecting. The stats are collected once the client is either publishing or subscribed.
|
|
virtual std::optional< std::string > | get_mid (const std::string &track_id)=0 |
| Get the transceiver mid associated to a track if any.
|
|
virtual void | enable_frame_transformer (bool enable)=0 |
| Add frame transformer so you can add metadata to frame When a new transformable frame is available, the listener method on_transformable_frame will be called.
|
|
virtual | ~ClientBase ()=default |
|
The Client base class.
This is the base class to handle a connection with the Millicast platform.
◆ connect() [1/2]
virtual bool millicast::compat::Client::connect |
( |
const JsonData & |
data, |
|
|
const std::optional< ConnectionOptions > & |
connection_options = std::nullopt |
|
) |
| |
|
pure virtual |
Connect to the media server directly using the websocket url and the JWT.
- Parameters
-
data | The JSON data returned by the director api. |
- Returns
- false if an error occurred, true otherwise.
◆ connect() [2/2]
virtual bool millicast::compat::Client::connect |
( |
const std::optional< ConnectionOptions > & |
connection_options = std::nullopt | ) |
|
|
pure virtual |
Connect and open a websocket connection with the Millicast platform.
- Returns
- false if an error occurred, true otherwise.
◆ disconnect()
virtual bool millicast::compat::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
- false if unable to reach a disconnected state, true otherwise.
◆ enable_frame_transformer()
virtual void millicast::compat::Client::enable_frame_transformer |
( |
bool |
enable | ) |
|
|
pure virtual |
Add frame transformer so you can add metadata to frame When a new transformable frame is available, the listener method on_transformable_frame will be called.
- Parameters
-
enable | true to enable the frame transformer false to disable it |
◆ enable_stats()
virtual void millicast::compat::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. |
◆ get_mid()
virtual std::optional< std::string > millicast::compat::Client::get_mid |
( |
const std::string & |
track_id | ) |
|
|
pure virtual |
Get the transceiver mid associated to a track if any.
- Parameters
-
track_id | The id of the track you want to retrieve the mid |
- Returns
- The transceiver mid if it exists
◆ is_connected()
virtual bool millicast::compat::Client::is_connected |
( |
| ) |
const |
|
pure virtual |
is_connected
- Returns
- return true if the client is connected to millicast, false otherwise.
The documentation for this class was generated from the following file: