Updated on 2023-03-23 GMT+08:00

Setting the Save Path

Function

This API is used to set the path for saving user files (including local recording files). This API is optional. If the save path is not set, the default path is used.

Function Prototype

setUserSavePath(userSavePathInfo: UserSavePathInfo, onSetUserSavePathResult?: (ret: SDKERR, reason: string) => void): voidsetUserSavePath(userSavePathInfo: UserSavePathInfo, onSetUserSavePathResult?: (ret: SDKERR, reason: string) => void): void

Request Parameters

Table 1 Input parameter description
Parameter Mandatory Type Description
userSavePathInfo Y UserSavePathInfo Save path information.
onSetUserSavePathResult Y (ret: SDKERR, reason: string) => void Callback of setting the save path.
Table 2 UserSavePathInfo
Parameter Mandatory Type Description
pathType Y SavePathType Save path type.
path Y string Save path. The value is an absolute path and must be encoded in UTF-8.
Table 3 Enumerated values of SavePathType
Enumeration Name Enumerated Value Description
HWM_SAVE_PATH_LOCAL_RECORD 0 Path for storing local recording files.

Return Values

void

Callback Method Parameters

(ret: SDKERR, reason: string) => void

Table 4 Input parameter description
Parameter Type Description
ret For details about SDKERR, see Error Code Reference. Error code.
reason string Error description.