|
virtual void | on_subscribed ()=0 |
| on_subscribed is called when the subcription to the stream is complete.
|
|
virtual void | on_subscribed_error (const std::string &error)=0 |
| Called when an error occured while establishing the peerconnection.
|
|
virtual void | on_track (std::weak_ptr< VideoTrack > track, const std::optional< std::string > &mid)=0 |
| on_track is called when a remote video track has been added.
|
|
virtual void | on_track (std::weak_ptr< AudioTrack > track, const std::optional< std::string > &mid)=0 |
| on_track is called when a remote audio track has been added.
|
|
virtual void | on_active (const std::string &stream_id, const std::vector< TrackInfo > &tracks, const std::optional< std::string > &source_id)=0 |
| Called when a new source has been publishing within the new stream.
|
|
virtual void | on_inactive (const std::string &stream_id, const std::optional< std::string > &source_id)=0 |
| Called when a source has been unpublished within the stream.
|
|
virtual void | on_stopped ()=0 |
| onStopped callback is not currently used, but is reserved for future usage.
|
|
virtual void | on_vad (const std::string &mid, const std::optional< std::string > &source_id)=0 |
| Called when a source id is being multiplexed into the audio track based on the voice activity level.
|
|
virtual void | on_layers (const std::string &mid, const std::vector< ViewerLayerData > &active_layers, const std::vector< std::string > &inactive_layers)=0 |
| Called when simulcast/svc layers are available.
|
|
virtual void | on_frame_metadata (uint32_t ssrc, uint32_t timestamp, const std::vector< uint8_t > &data) |
| Called when a frame is received and not yet decoded Extract metadata embedded in the frame if any.
|
|
virtual void | on_connected ()=0 |
| on_connected is called when the WebSocket connection to Millicast is opened
|
|
virtual void | on_disconnected ()=0 |
| on_disconnected is called when the WebSocket connection to Millicast is closed. If this was an unintended disconnect, a reconnect attempt will happen automatically by default. To turn off the automatic reconnect, set {Option::auto_reconnect} to false.
|
|
virtual void | on_connection_error (int status, const std::string &reason)=0 |
| on_connection_error is called when the attempt to connect to Millicast failed.
|
|
virtual void | on_signaling_error (const std::string &message)=0 |
| Called when millicast sends back an error message in response to a websocket command.
|
|
virtual void | on_stats_report (std::unique_ptr< StatsReport >) |
| on_stats_report is called when a new rtc stats report has been collected.
|
|
virtual void | on_viewer_count (int count)=0 |
| Called when a new viewer join the stream or when a viewer quit the stream.
|
|
virtual | ~ClientListener ()=default |
|
The Listener struct for the Viewer class. It adds the on_subscribed event on top of the Client listener You must inherit this class and set a listener with set_listener to be able to receive events from the Viewer.