Subscriber Listener
The SubscriberListener interface provides a set of callback methods to handle various events and states during the subscription process. To use this interface and receive events from the Subscriber, you must inherit it and use the setListener method.
Functions
Called when the client successfully establishes a connection to the Millicast platform. This callback serves as a notification that the streaming session is now active and ready to transmit or receive data.
Called when an error occurs during the connection process.
Called when the client disconnects from the Millicast platform. This callback provides an opportunity for the application to perform cleanup tasks or handle disconnection-related events. In the case of an unintended disconnection, a reconnect attempt happens automatically by default. To disable the automatic reconnect, set autoReconnect to false.
Called after metadata have been extracted from a frame.
Called when a source has been unpublished within a stream.
Event telling that the current instance needs to release any ressources it holds and reset itself.
Called when the Millicast platform sends back an error message in response to a connection request.
Called when the client receives a report containing statistics related to the streaming session. The stats parameter holds the statistical information, offering insights into aspects such as connection quality and other performance metrics. Reports are available only to clients who enabled statistics.
Called when the subscriber starts receiving media.
Called in the event of an error during the peer connection process.
Called when an audio track is added to the call.
Called when a video track is added to the call.
Called when the number of viewers in the streaming session changes.