onMediaPlayerSoundLevelUpdate property

(void Function(ZegoMediaPlayer mediaPlayer, double soundLevel)?) onMediaPlayerSoundLevelUpdate
getter/setter pair

The callback of sound level update.

Available since: 2.15.0 Description: The callback of sound level update. Trigger: The callback frequency is specified by EnableSoundLevelMonitor. Caution: The callback does not actually take effect until call setEventHandler to set. Related APIs: To monitor this callback, you need to enable it through EnableSoundLevelMonitor.

  • mediaPlayer Callback player object.
  • soundLevel Sound level value, value range: 0.0, 100.0 (This value only represents the range of the sound level value returned by the callback, not the precision.).

Implementation

static void Function(ZegoMediaPlayer mediaPlayer, double soundLevel)?
    onMediaPlayerSoundLevelUpdate;