onRhythmPlayerStateChanged

Occurs when the state of virtual metronome changes.

onRhythmPlayerStateChanged?(
    state: RhythmPlayerStateType,
    reason: RhythmPlayerReason
  ): void;

When the state of the virtual metronome changes, the SDK triggers this callback to report the current state of the virtual metronome. This callback indicates the state of the local audio stream and enables you to troubleshoot issues when audio exceptions occur.

Parameters

state
For the current virtual metronome status, see RhythmPlayerStateType.
errorCode
For the error codes and error messages related to virtual metronome errors, see RhythmPlayerReason.