pushAudioFrame abstract method

Future<void> pushAudioFrame({
  1. required AudioFrame frame,
  2. int trackId = 0,
})

Pushes external audio frames.

Call this method to push external audio frames through an audio track.

  • frame External audio frame. See AudioFrame.
  • trackId Audio track ID. If you want to publish a custom external audio source, set this parameter to the custom audio track ID you want to publish.

Returns When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly. See Error Codes for details and resolution suggestions.

Implementation

Future<void> pushAudioFrame({required AudioFrame frame, int trackId = 0});