setAudioAlignmentProperty abstract method

Future<int?> setAudioAlignmentProperty({
  1. required RemoteStreamKey streamKey,
  2. required AudioAlignmentMode mode,
})

On the listener side, sets all subscribed audio streams precisely timely aligned.

streamKey: The remote audio stream used as the benchmark during time alignment.
We recommend you use the audio stream from the lead singer.
You must call this API after receiving RTCRoomEventHandler.onUserPublishStream.

mode: Whether to enable the alignment. Disabled by default.

Return value:

Notes:

  • You must use the function when all participants set RoomProfile to chorus when joining the room.
  • All remote participants must call RTCMediaPlayer.start to play background music and set syncProgressToRecordFrame of AudioMixingConfig to true.
  • If the subscribed audio stream is delayed too much, it may not be precisely aligned.
  • The chorus participants must not enable the alignment. If you wish to change the role from listener to participant, you should disable the alignment.

Implementation

Future<int?> setAudioAlignmentProperty({
  required RemoteStreamKey streamKey,
  required AudioAlignmentMode mode,
});