MillicastSDK 1.8.4
|
The Viewer class. Its purpose is to receive media by subscribing to a millicast stream. The stream must already exists and someone must publish media. More...
#include <viewer.h>
Public Member Functions | |
virtual Promise< void > | subscribe (std::optional< ViewerOption > &&options=std::nullopt)=0 |
Subscribe to a Millicast stream. You must be connected first in order to subscribe to a stream. | |
virtual Promise< void > | unsubscribe ()=0 |
Stop receiving media from Millicast. | |
virtual Promise< bool > | is_subscribed () const =0 |
Tell if the viewer is subscribed. | |
virtual Promise< void > | project (std::string &&source_id, std::vector< ViewerProjectionData > &&pdata)=0 |
virtual Promise< void > | unproject (std::vector< std::string > &&mids)=0 |
virtual Promise< void > | select (std::optional< ViewerLayerData > &&layer)=0 |
virtual Promise< void > | add_remote_track (std::string &&kind)=0 |
virtual Promise< void > | set_credentials (ViewerCredentials &&creds)=0 |
Set the viewer credentials. | |
virtual Promise< ViewerCredentials > | get_credentials () const =0 |
Get the current viewer credentials. | |
virtual Promise< void > | set_listener (ViewerListener *listener)=0 |
set_listener : set the viewer listener to receive event from the viewer. | |
virtual compat::Viewer & | get_old_api ()=0 |
Gets the synchronous API for this viewer. Note that it will be deprecated in the future. | |
Public Member Functions inherited from millicast::promises::Client | |
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 Promise< std::optional< std::string > > | get_mid (std::string &&track_id)=0 |
virtual Promise< 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. | |
Public Member Functions inherited from millicast::ClientBase | |
virtual | ~ClientBase ()=default |
Static Public Member Functions | |
static std::unique_ptr< Viewer > | create () |
Create a new viewer. | |
Static Public Member Functions inherited from millicast::ClientBase | |
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. | |
Additional Inherited Members | |
Public Types inherited from millicast::ClientBase | |
using | Listener = ClientListener |
using | ConnectionOptions = ClientConnectionOptions |
using | Option = ClientOption |
using | JsonData = ClientJsonData |
The Viewer class. Its purpose is to receive media by subscribing to a millicast stream. The stream must already exists and someone must publish media.
|
pure virtual |
|
static |
Create a new viewer.
|
pure virtual |
Get the current viewer credentials.
|
pure virtual |
Gets the synchronous API for this viewer. Note that it will be deprecated in the future.
|
pure virtual |
Tell if the viewer is subscribed.
|
pure virtual |
|
pure virtual |
|
pure virtual |
Set the viewer credentials.
creds | The credentials |
|
pure virtual |
set_listener : set the viewer listener to receive event from the viewer.
listener | The Viewer listener |
|
pure virtual |
Subscribe to a Millicast stream. You must be connected first in order to subscribe to a stream.
options | subscribing options (optional) |
|
pure virtual |
|
pure virtual |
Stop receiving media from Millicast.