Server Recording And Local Recording
startServerRecord
- A brief description - Start server recording
We provide a course recording feature that can fully reproduce the teaching process. Calling this interface can record the course. - After recording is started, the callback is: the callback of the recording status - (void)onRoomServerRecordStateChange(TK_RECORD_STATE state, String userId, String mp4RecordId, String commonRecordId);
- Interface Name
- (int)startServerRecord(Map<String, Object> recordParams, long expiresabs, long expires);
- Parameters
Parameter Name | Required | Type | Description |
---|---|---|---|
recordParams | Yes | Map | Recording parameters include two recording modes: standard and mix. For details, see the method example |
expiresabs | Yes | long | Recording duration, 0: indicates no time limit, until the stop recording call is made |
expires | Yes | long | The timestamp when recording ends, 0: indicates that no end time is set |
- Method Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
|
- Return Value Description
Type | Description |
---|---|
int | 0: Indicates successful invocation; Non-zero: Indicates invocation failure |
stopServerRecord
-
A brief description - Stop server recording
-
Interface Name
- (int)stopServerRecord();
- Method Example
TKRoomManager.getInstance().stopServerRecord();
- Return Value Description
Type | Description |
---|---|
int | 0: Indicates successful invocation; Non-zero: Indicates invocation failure |
pauseServerRecord
-
A brief description - Pause server recording
-
Interface Name
- (int)pauseServerRecord();
- Method Example
TKRoomManager.getInstance().pauseServerRecord();
- Return Value Description
Type | Description |
---|---|
int | 0: Indicates successful invocation; Non-zero: Indicates invocation failure |
resumeServerRecord
-
A brief description - Resume server recording
-
Interface Name
- (int)resumeServerRecord();
- Method Example
TKRoomManager.getInstance().resumeServerRecord();
- Return Value Description
Type | Description |
---|---|
int | 0: Indicates successful invocation; Non-zero: Indicates invocation failure |
startAudioRecording
- A brief description - Start local audio recording
It will record all the sound data in the room and then save it to the sandbox.
- Interface Name
- (int)startAudioRecording(String filePath);
- Parameters
Parameter Name | Required | Type | Description |
---|---|---|---|
filePath | Yes | String | The path where the recording file is saved must be a valid sandbox file path, such as xxx/Library/Caches/audioRecord.mp3. Note:1. The audio file is saved in MP3 format; 2. If the same path is passed in twice, the recording data will be overwritten; 3. The file path must be a valid path, otherwise the recording will fail. For example, if the path does not exist or is not a file path (but a folder path), the recording will fail. |
- Method Example
TKRoomManagerImpl.getInstance().startAudioRecording(filePath);
- Return Value Description
Type | Description |
---|---|
int | 0: Indicates successful invocation; Non-zero: Indicates invocation failure |
pauseAudioRecording
- A brief description - Whether to pause audio recording
It will record all the sound data in the room and then save it to the sandbox.
- Interface Name
- (int)pauseAudioRecording(boolean isPause);
- Parameters
Parameter Name | Required | Type | Description |
---|---|---|---|
isPause | Yes | boolean | Whether to pause recording |
- Method Example
TKRoomManager.getInstance().pauseAudioRecording(false);
- Return Value Description
Type | Description |
---|---|
int | 0: Indicates successful invocation; Non-zero: Indicates invocation failure |
stopAudioRecord
-
A brief description - Stop local audio recording
-
Interface Name
- (int)stopAudioRecording();
- Method Example
TKRoomManagerImpl.getInstance().stopAudioRecording();
- Return Value Description
Type | Description |
---|---|
int | 0: Indicates successful invocation; Non-zero: Indicates invocation failure |