Server Recording and Local Recording
startServerRecord
- Brief description
Enable server recording
We provide a course recording function that can fully reproduce the teaching process. By calling this interface, you can record the course. After enabling the recording, the callback is: The callback for the recording status is -(void)roomManagerOnServerRecordStateChanged:(TKRecordState)state fromID:(NSString )peerID extension:(NSDictionary )extension
- Interface name
1 2 3 |
|
- Parameter
Parameter Name | Required | Type | Description |
---|---|---|---|
spec | Yes | NSDictionary | Recording Parameters |
expiresabs | Yes | NSInteger | Recording duration. 0 indicates no time limit until the stop recording API is called |
expires | Yes | NSInteger | The timestamp when the 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 |
|
- Return Value Description
Type | Description |
---|---|
int | 0: Indicates that the call was successful. Non-zero: Indicates that the call failed |
stopServerRecord
- Brief description
Stop server recording
- Interface name
- (int)stopServerRecord;
- Method Example
[_roomMgr stopServerRecord];
- Return Value Description
Type | Description |
---|---|
int | 0: Indicates that the call was successful. Non-zero: Indicates that the call failed |
pauseServerRecord
- Brief description
Pause server recording
- Interface name
- (int)pauseServerRecord;
- Method Example
[_roomMgr pauseServerRecord];
- Return Value Description
Type | Description |
---|---|
int | 0: Indicates that the call was successful. Non-zero: Indicates that the call failed |
resumeServerRecord
- Brief description
Resume server recording
- Interface name
- (int)resumeServerRecord;
- Method Example
[_roomMgr resumeServerRecord];
- Return Value Description
Type | Description |
---|---|
int | 0: Indicates that the call was successful. Non-zero: Indicates that the call failed |
startAudioRecord
- Brief description
Enable local audio recording
It will record all the audio data in the room and then save it to the sandbox.
- Interface name
- (int)startAudioRecord:(NSString *)sandboxPath;
- Parameter
Parameter Name | Required | Type | Description |
---|---|---|---|
sandboxPath | Yes | NSString | The path for saving the recorded file must be a valid sandbox file path, such as xxx/Library/Caches/audioRecord.mp3.Notes:1. The audio file is saved in MP3 format.2. If the same path is provided twice, the recorded data will overwrite the existing file.3. The file path must be valid; otherwise, the recording will fail. For example, if the path does not exist or is a directory path instead of a file path, the recording will fail. |
- Method Example
1 2 3 4 5 6 7 8 |
|
- Return Value Description
Type | Description |
---|---|
int | 0: Indicates that the call was successful. Non-zero: Indicates that the call failed |
pauseAudioRecord
- Brief description
Whether to pause local audio recording
- Interface name
- (int)pauseAudioRecord:(BOOL)pause;
- Parameter
Parameter Name | Required | Type | Description |
---|---|---|---|
pause | Yes | BOOL | Whether to pause the recording |
- Method Example
[_roomMgr pauseAudioRecord:YES];
- Return Value Description
Type | Description |
---|---|
int | 0: Indicates that the call was successful. Non-zero: Indicates that the call failed |
stopAudioRecord
- Brief description
Stop local audio recording
- Interface name
- (int)stopAudioRecord;
- Method Example
[_roomMgr stopAudioRecord];
- Return Value Description
Type | Description |
---|---|
int | 0: Indicates that the call was successful. Non-zero: Indicates that the call failed |
Notes
For more return error codes, please refer to the description of TKRoomErrorCode error codes