configRhythmPlayer
Configures the virtual metronome.
abstract configRhythmPlayer(config: AgoraRhythmPlayerConfig): number;
- After calling startRhythmPlayer, you can call this method to reconfigure the virtual metronome.
- After enabling the virtual metronome, the SDK plays the specified audio effect file from the beginning, and controls the playback duration of each file according to beatsPerMinute you set in AgoraRhythmPlayerConfig. For example, if you set beatsPerMinute as
60
, the SDK plays one beat every second. If the file duration exceeds the beat duration, the SDK only plays the audio within the beat duration. - By default, the sound of the virtual metronome is published in the channel. If you want the sound to be heard by the remote users, you can set publishRhythmPlayerTrack in ChannelMediaOptions as
true
.
Call timing
This method can be called either before or after joining the channel.
Restrictions
None.
Parameters
- config
- The metronome configuration. See AgoraRhythmPlayerConfig.