onRemoteUserAudioFrame$info$audioFrame method
FutureOr<void>
onRemoteUserAudioFrame$info$audioFrame(
- dynamic streamId,
- dynamic info,
- dynamic audioFrame
override
@detail callback @author wangjunzheng @brief Returns the audio data of one remote user. @param streamId The unique identifier of the remote stream. @param info Detailed information of the remote stream. See ByteRTCStreamInfo{@link #ByteRTCStreamInfo}. @param audioFrame Audio data. See ByteRTCAudioFrame{@link #ByteRTCAudioFrame}. @note This callback works on the playback thread. Don't do anything time-consuming in this callback, or it may affect the entire audio playback chain.
Implementation
FutureOr<void> onRemoteUserAudioFrame$info$audioFrame(
dynamic streamId, dynamic info, dynamic audioFrame) async {
if ($instance == null || $instance is! IAudioFrameObserver) {
return;
}
return ($instance as IAudioFrameObserver).onRemoteUserAudioFrame?.call(
streamId.toString(),
packObject(
audioFrame,
() => AudioFrame.fromMap(AudioFrame.deepPackedMapValues(
AudioFrame.mapMemberToConstructorParams(audioFrame)))));
}