startFileRecording method
@detail api
@hiddensdk(audiosdk)
@author wangzhanqiang
@brief This method records the audio & video data during the call to a local file.
@param config Local recording parameter configuration. See RecordingConfig{@link #RecordingConfig}
@param recordingType Locally recorded media type, see RecordingType{@link #RecordingType}
Note:Screen stream only supports recording video (RECORD_VIDEO_ONLY);Main stream supports recording all types.
@return 0: Normal
-1: Parameter setting exception
-2: The current version of the SDK does not support this feature, please contact technical support staff
@note
- You must join a room before calling this method.
- Tune When you use this method, you get an onRecordingStateUpdate{@link #IRTCEngineEventHandler#onRecordingStateUpdate} callback.
- If the recording is normal, the system will notify the recording progress through the onRecordingProgressUpdate{@link #IRTCEngineEventHandler#onRecordingProgressUpdate} callback every second.
Implementation
FutureOr<int> startFileRecording(
RecordingConfig config, RecordingType recordingType) async {
return await nativeCall(
'startFileRecording', [config, recordingType.$value]);
}