Publisher Listener
The PublisherListener interface provides a set of callback methods to handle various events and states during the publishing process. The interface is replaced with publisher.state.collect().
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 when the last viewer stops viewing the stream.
Called when the publisher starts publishing content.
Called in the event of an error during the peer connection process.
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 after the frame has been encoded and is ready to gather metadata.
Called when the number of viewers in the streaming session changes.