enableSoundLevelMonitor abstract method

Future<void> enableSoundLevelMonitor(
  1. bool enable,
  2. int millisecond
)

Whether to enable sound level monitoring.

Available since: 2.15.0 Description: Whether to enable sound level monitoring. When to call: It can be called after the engine by createEngine has been initialized and the media player has been created by createMediaPlayer. Restrictions: None. Related callbacks: After it is turned on, user can use the onMediaPlayerSoundLevelUpdate callback to monitor sound level updates.

  • enable Whether to enable monitoring, true is enabled, false is disabled.
  • millisecond Monitoring time period of the sound level, in milliseconds, has a value range of 100, 3000.

Implementation

Future<void> enableSoundLevelMonitor(bool enable, int millisecond);