configRhythmPlayer method

  1. @override
Future<void> configRhythmPlayer(
  1. RhythmPlayerConfig config
)

Configures the virtual metronome.

Since v3.4.2

After calling RtcEngine.startRhythmPlayer, you can call this method to reconfigure the virtual metronome.

Note

  • After reconfiguring the virtual metronome, the SDK plays the specified files from the beginning and controls the beat duration according to the value of beatsPerMinute in RhythmPlayerConfig. If the file duration exceeds the beat duration, the SDK only plays the audio within the beat duration.

Parameter config The metronome configuration. For details, see RhythmPlayerConfig.

Implementation

@override
Future<void> configRhythmPlayer(RhythmPlayerConfig config) {
  return _invokeMethod('configRhythmPlayer', {
    'config': config.toJson(),
  });
}