On-premise Recording SDK v3.0.6 API Reference for Linux (Java)
|
Public Member Functions | |
RecordingSDK () | |
void | registerOberserver (RecordingEventHandler recordingEventHandler) |
void | unRegisterOberserver (RecordingEventHandler recordingEventHandler) |
native boolean | createChannel (String appId, String channelKey, String name, int uid, RecordingConfig config, int logLevel) |
native boolean | createChannelWithUserAccount (String appId, String channelKey, String name, String userAccount, RecordingConfig config, int logLevel) |
long | getUidByUserAccount (String userAccount) |
String | getUserAccountByUid (int uid) |
synchronized boolean | leaveChannel () |
int | setVideoMixingLayout (VideoMixingLayout layout) |
int | updateWatermarkConfigs (LiteraWatermarkConfig[] literaWms, TimestampWatermarkConfig[] timestampWms, ImageWatermarkConfig[] imgWms) |
int | updateSubscribeVideoUids (int[] uids) |
int | updateSubscribeAudioUids (int[] uids) |
int | startService () |
int | stopService () |
RecordingEngineProperties | getProperties () |
int | setUserBackground (int uid, String imagePath) |
void | setLogLevel (int level) |
Static Public Attributes | |
static int | MAX_USER_ACCOUNT_LENGTH = 256 |
io.agora.recording.RecordingSDK.RecordingSDK | ( | ) |
Main methods that can be invoked by your application.
void io.agora.recording.RecordingSDK.registerOberserver | ( | RecordingEventHandler | recordingEventHandler | ) |
To register observer to receive Recording event notification.
void io.agora.recording.RecordingSDK.unRegisterOberserver | ( | RecordingEventHandler | recordingEventHandler | ) |
To remove previously registered observer.
native boolean io.agora.recording.RecordingSDK.createChannel | ( | String | appId, |
String | channelKey, | ||
String | name, | ||
int | uid, | ||
RecordingConfig | config, | ||
int | logLevel | ||
) |
This method creates a channel and enables the recording server to join the channel.
appId | Set appId of the recording server the same as that of the Native/Web SDK. For more information, see Getting an App ID. |
channelKey | The dynamic key for authentication. Set channelKey of the recording server the same as that of the Native/Web SDK. If the Native/Web SDK uses a token, channelKey must be set as the token. For more information, see Use Security Keys. In the Recording SDK, requestToken and renewToken are private interfaces. Therefore, ensure that you set expireTimestamp as 0 when generating a token, which means that the privilege, once generated, never expires. |
name | The name of the channel to be recorded. |
uid | The unique identifier of a user. A channel does not accept duplicate uids. Otherwise, there will be unpredictable behaviors.
|
config | Detailed recording configuration. See RecordingConfig. |
logLevel | Sets the log level. Only logs in the selected level and levels preceding the selected level are generated.
|
native boolean io.agora.recording.RecordingSDK.createChannelWithUserAccount | ( | String | appId, |
String | channelKey, | ||
String | name, | ||
String | userAccount, | ||
RecordingConfig | config, | ||
int | logLevel | ||
) |
This method creates a channel and enables the recording server to join with the user account.
After the recording server successfully joins the channel, the SDK triggers the onLocalUserRegistered and onJoinChannelSuccess callbacks on the local client.
appId | Set appId of the recording server the same as that of the Native/Web SDK. A channel does not accept duplicate uids. Otherwise, there will be unpredictable behaviors. For more information, see Getting an App ID. |
channelKey | The dynamic key for authentication. Set channelKey of the recording server the same as that of the Native/Web SDK. If the Native/Web SDK uses a token, channelKey must be set as the token. For more information, see Use Security Keys. In the Recording SDK, requestToken and renewToken are private interfaces. Therefore, ensure that you set expireTimestamp as 0 when generating a token, which means that the privilege, once generated, never expires. |
name | The name of the channel to be recorded. |
userAccount | The user account of the recording server. The maximum length of this parameter is 255 bytes. Ensure that you set this parameter and do not set it as null. Supported character scopes are:
|
config | Detailed recording configuration. See RecordingConfig. |
logLevel | Sets the log level. Only logs in the selected level and levels preceding the selected level are generated.
|
long io.agora.recording.RecordingSDK.getUidByUserAccount | ( | String | userAccount | ) |
Gets the user ID by passing in the user account.
After a remote user joins the channel, the SDK gets the user ID and user account of the remote user and triggers the onUserInfoUpdated callback on the local client.
After receiving the onUserInfoUpdated callback, you can call the getUidByUserAccount
method to get the user ID of the remote user by passing in the user account.
userAccount | The user account of the remote user. Ensure that you set this parameter. |
String io.agora.recording.RecordingSDK.getUserAccountByUid | ( | int | uid | ) |
Gets the user account by passing in the user ID.
After a remote user joins the channel, the SDK gets the user ID and user account of the remote user and triggers the onUserInfoUpdated callback on the local client.
After receiving the onUserInfoUpdated callback, you can call the getUserAccountByUid
method to get the user account of the remote user from the UserInfo object by passing in the user ID.
uid | The user ID of the remote user. Ensure that you set this parameter. |
synchronized boolean io.agora.recording.RecordingSDK.leaveChannel | ( | ) |
This method allows the recording server to leave the channel and release the thread resources.
int io.agora.recording.RecordingSDK.setVideoMixingLayout | ( | VideoMixingLayout | layout | ) |
This method sets the video layout in composite recording mode.
layout | Layout setting. See VideoMixingLayout. |
int io.agora.recording.RecordingSDK.updateWatermarkConfigs | ( | LiteraWatermarkConfig[] | literaWms, |
TimestampWatermarkConfig[] | timestampWms, | ||
ImageWatermarkConfig[] | imgWms | ||
) |
This method adds, updates, or deletes the watermark configurations.
The Agora Recording SDK supports three types of watermarks: text watermarks, timestamp watermarks, and image watermarks.
LiteraWatermarkConfig
, TimestampWatermarkConfig
, or ImageWatermarkConfig
to add watermarks when calling the setVideoMixingLayout method, you can directly call the updateWatermarkConfigs
method to add watermarks. LiteraWatermarkConfig
, TimestampWatermarkConfig
, or ImageWatermarkConfig
to add watermarks when calling the setVideoMixingLayout method, you can call the updateWatermarkConfigs
method to add, update, or delete watermarks. If you pass null as parameters in the updateWatermarkConfigs
method, you delete watermarks that have been added. literaWms | Adds text watermarks. Pointer to an array of LiteraWatermarkConfig. You can add up to ten text watermarks. |
timestampWms | Adds a timestamp watermark. Pointer to TimestampWatermarkConfig. You can only add one timestamp watermark. |
imgWms | Adds image watermarks. Pointer to an array of ImageWatermarkConfig. You can add up to four image watermarks. |
int io.agora.recording.RecordingSDK.updateSubscribeVideoUids | ( | int[] | uids | ) |
This method updates the UIDs of the users whose video streams you want to record.
uids | An array of UIDs whose video streams you want to record in the string format, such as {"1","2","3"}. |
int io.agora.recording.RecordingSDK.updateSubscribeAudioUids | ( | int[] | uids | ) |
This method updates the UIDs of the users whose audio streams you want to record.
uids | An array of UIDs whose audio streams you want to record in the string format, such as {"1","2","3"}. |
int io.agora.recording.RecordingSDK.startService | ( | ) |
This method manually starts a recording.
The method is only valid when you set triggerMode in RecrordingConfig as 1 (manually) when joining the channel.
int io.agora.recording.RecordingSDK.stopService | ( | ) |
This method manually pauses the recording.
The method is only valid when you set triggerMode in RecordingConfig as 1 (manually) when joining the channel.
RecordingEngineProperties io.agora.recording.RecordingSDK.getProperties | ( | ) |
This method allows you to retrieve the recording properties.
getProperties
method and the onUserJoined callback report the relative path of the recorded files and recording log. The difference between these two functions is that the recording SDK only triggers the onUserJoined callback when a remote user joins the channel. int io.agora.recording.RecordingSDK.setUserBackground | ( | int | uid, |
String | imagePath | ||
) |
This method sets the background image of a specified user.
When the user is online but does not send any video stream, the background image is displayed.
uid | The UID of the user for whom the background image to be set. |
imagePath | The path of the image file. Only supports local images in JPEG format. |
void io.agora.recording.RecordingSDK.setLogLevel | ( | int | level | ) |
This method sets the log level.
Only log in the selected level and levels preceding the selected level are generated. The default value of the log level is 5.
level | The log level:
|
|
static |
The maximum length of the user account.