This Java API is a data encapsulation of the C++ sample code with JNI, and is therefore slightly different from that of the C++ API in structure. The Agora SDK (sample code shared by C++ and Java) implements the C++ recording APIs and callbacks, goes through data encapsulation in the JNI layer, and then works as the Java interface and class of the Native SDK through the JNI proxy.
- The RecordingSDK class provides the main methods that can be invoked by your application.
- The RecordingEventHandler class enables callbacks to your application.
|createChannel||Creates a channel.|
|setVideoMixingLayout||Sets the video mixing layout.|
|leaveChannel||Allows the app to leave the channel.|
|getProperties||Retrieves the recording properties.|
|startService||Starts a recording.|
|stopService||Pauses the recording.|
|nativeObjectRef||Returns the JNI instance.|
|onWarning||Occurs when a warning occurs.|
|onError||Occurs when an error occurs.|
|onJoinChannelSuccess||Occurs when a user joins a channel.|
|onLeaveChannel||Occurs when a user leaves the channel.|
|onUserJoined||Occurs when a remote user joins the channel.|
|onUserOffline||Occurs when a remote user leaves the channel or goes offline.|
|audioFrameReceived||Occurs when the raw audio data is received.|
|videoFrameReceived||Occurs when the raw video data is received.|
|onActiveSpeaker||Reports which user is speaking in the channel.|