onEngineStateUpdate property

(void Function(ZegoEngineState state)?) onEngineStateUpdate
getter/setter pair

The callback triggered when the audio/video engine state changes.

Available since: 1.1.0 Description: Callback notification of audio/video engine status update. When audio/video functions are enabled, such as preview, push streaming, local media player, audio data observering, etc., the audio/video engine will enter the start state. When you exit the room or disable all audio/video functions , The audio/video engine will enter the stop state. Trigger: The developer called the relevant function to change the state of the audio and video engine. For example: 1. Called ZegoExpressEngine's startPreview, stopPreview, startPublishingStream, stopPublishingStream, startPlayingStream, stopPlayingStream, startAudioDataObserver, stopAudioDataObserver and other functions. 2. The related functions of MediaPlayer are called. 3. The LogoutRoom function was called. 4. The related functions of RealTimeSequentialDataManager are called. Restrictions: None. Caution:

  1. When the developer calls destroyEngine, this notification will not be triggered because the resources of the SDK are completely released.
  2. If there is no special need, the developer does not need to pay attention to this callback.
  • state The audio/video engine state.

Implementation

static void Function(ZegoEngineState state)? onEngineStateUpdate;