|
virtual bool | publish (const std::optional< Publisher::Option > &options=std::nullopt)=0 |
| Publish a stream to Millicast You must be connected first in order to publish a stream.
|
|
virtual bool | unpublish ()=0 |
| Stop sending media to Millicast. The SDK will automatically disconnect after unpublish.
|
|
virtual bool | is_publishing () const =0 |
| Tell if the publisher is publishing.
|
|
virtual void | record ()=0 |
|
virtual void | unrecord ()=0 |
|
virtual bool | set_credentials (const Credentials &creds)=0 |
| Set the publisher credentials.
|
|
virtual bool | set_credentials (Credentials &&creds)=0 |
|
virtual Credentials | get_credentials () const =0 |
| Get the current publisher credentials.
|
|
virtual void | add_track (std::weak_ptr< Track > track)=0 |
| Add a track that will be used to publish media (audio or video).
|
|
virtual void | add_track (std::weak_ptr< VideoTrack > track)=0 |
|
virtual void | add_track (std::weak_ptr< AudioTrack > track)=0 |
|
virtual void | clear_tracks ()=0 |
| clear_tracks will clear all track added to the publisher.
|
|
virtual void | set_listener (Publisher::Listener *listener)=0 |
| set_listener : set the viewer listener to receive event from the viewer.
|
|
virtual void | set_recording_listener (RecordingListener *rlistener)=0 |
|
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 Publisher class. Its purpose is to publish media to a Millicast stream.