RecorderManager.onFrameRecorded
JS
RecorderManager.onFrameRecorded(function callback)Listens for the event that a file of the specified frame size has been recorded
Only effective when frameSize > 0 is set at start. Supports all encoding formats.
Parameters
- function callback: the callback function for the event that the specified frame size has been recorded
callback Parameters
- Object res: frame data information
res Properties:
| Property | Type | Description |
|---|---|---|
| frameBuffer | ArrayBuffer | Recording chunk data. The content format depends on the format specified at start: "PCM" is raw PCM data, "aac" / "mp3" are encoded compressed data segments |
| isLastFrame | boolean | Whether the current frame is the last frame. This value is true for the last callback after stop; the amount of data in this frame may be less than frameSize |
