onPublisherSendAudioFirstFrame method

void onPublisherSendAudioFirstFrame(
  1. ZegoPublishChannel channel
)

The callback triggered when the first video frame is captured.

Available since: 1.1.0 Description: The SDK will receive this callback when the first frame of video data is captured. If this callback is not received, the video capture device is occupied or abnormal. Trigger: When the SDK's internal audio/video module's engine starts, the SDK will collect video data from the local device and will receive this callback. Related callbacks: Determine if the SDK actually collected audio data by the callback function onPublisherCapturedAudioFirstFrame, determine if the SDK has rendered the first frame of video data collected by calling back onPublisherRenderVideoFirstFrame. Note: This function is only available in ZegoExpressVideo SDK!

  • channel Publishing stream channel.If you only publish one audio and video stream, you can ignore this parameter.void onPublisherCapturedVideoFirstFrame(ZegoPublishChannel channel,) {} The callback triggered when the first audio frame is sent.

Available since: 3.5.0 Description: After the startPublishingStream function is called successfully, this callback will be called when SDK received the first frame of audio data. Developers can use this callback to determine whether SDK has actually collected audio data. If the callback is not received, the audio capture device is occupied or abnormal. Trigger: In the case of no startPublishingStream audio stream, the first startPublishingStream audio stream, it will receive this callback. Related callbacks: After the startPublishingStream function is called successfully, determine if the SDK actually collected video data by the callback function onPublisherCapturedVideoFirstFrame, determine if the SDK has rendered the first frame of video data collected by calling back onPublisherRenderVideoFirstFrame.

  • channel Publishing stream channel.If you only publish one audio stream, you can ignore this parameter.

Implementation

/// The callback triggered when the first audio frame is sent.
///
/// Available since: 3.5.0
/// Description: After the [startPublishingStream] function is called successfully, this callback will be called when SDK received the first frame of audio data. Developers can use this callback to determine whether SDK has actually collected audio data. If the callback is not received, the audio capture device is occupied or abnormal.
/// Trigger: In the case of no startPublishingStream audio stream, the first startPublishingStream audio stream, it will receive this callback.
/// Related callbacks: After the [startPublishingStream] function is called successfully, determine if the SDK actually collected video data by the callback function [onPublisherCapturedVideoFirstFrame], determine if the SDK has rendered the first frame of video data collected by calling back [onPublisherRenderVideoFirstFrame].
///
/// - [channel] Publishing stream channel.If you only publish one audio stream, you can ignore this parameter.
void onPublisherSendAudioFirstFrame(
  ZegoPublishChannel channel,
) {}