startRecordingCapturedData method

Future<void> startRecordingCapturedData(
  1. ZegoDataRecordConfig config,
  2. {ZegoPublishChannel? channel}
)

Starts to record and directly save the data to a file.

Available since: 1.10.0 Description: Starts to record locally captured audio or video and directly save the data to a file, The recorded data will be the same as the data publishing through the specified channel. Restrictions: None. Caution: Developers should not stopPreview or stopPublishingStream during recording, otherwise the SDK will end the current recording task. The data of the media player needs to be mixed into the publishing stream to be recorded. Related callbacks: Developers will receive the onCapturedDataRecordStateUpdate and the onCapturedDataRecordProgressUpdate callback after start recording.

  • config Record config.
  • channel Publishing stream channel.

Implementation

Future<void> startRecordingCapturedData(ZegoDataRecordConfig config,
    {ZegoPublishChannel? channel}) async {
  return await ZegoExpressImpl.instance
      .startRecordingCapturedData(config, channel: channel);
}