startFileRecording method
- ByteRTCRecordingConfig recordingConfig,
- ByteRTCRecordingType recordingType
@detail api @hiddensdk(audiosdk) @author wangzhanqiang @brief This method records the audio & video data during the call to a local file. @param recordingConfig Local recording parameter configuration. See ByteRTCRecordingConfig{@link #ByteRTCRecordingConfig} @param recordingType Locally recorded media type, see ByteRTCRecordingType{@link #ByteRTCRecordingType} @return - 0: normal - -1: Parameter setting exception - -2: The current version of the SDK does not support this feature, please contact technical support @note - You must join a room before calling this method. - After this API is called, the local user will receive rtcEngine:onRecordingStateUpdate:state:error_code:recording_info:{@link #ByteRTCEngineDelegate#rtcEngine:onRecordingStateUpdate:state:error_code:recording_info} callback. - If the recording is normal, the system will report the recording progress through rtcEngine:onRecordingProgressUpdate:process:recording_info:{@link #ByteRTCEngineDelegate#rtcEngine:onRecordingProgressUpdate:process:recording_info} callback every second.
Implementation
FutureOr<int> startFileRecording(ByteRTCRecordingConfig recordingConfig,
ByteRTCRecordingType recordingType) async {
return await nativeCall(
'startFileRecording:type:', [recordingConfig, recordingType.$value]);
}