Updated on 2024-07-30 GMT+08:00

Obtaining the Save Path

Function

This API is used to obtain the path for saving user files (including local recording files). It is valid only for the Windows platform.

Function Prototype

getUserSavePath(pathType: SavePathType, onGetUserSavePathResult?: (ret: SDKERR, reason: string, pathInfo: UserSavePathInfo) => void): voidgetUserSavePath(pathType: SavePathType, onGetUserSavePathResult?: (ret: SDKERR, reason: string, pathInfo: UserSavePathInfo) => void): void

Request Parameters

Table 1 Input parameter description
Parameter Mandatory Type Description
pathType Yes SavePathType Save path type.
onGetUserSavePathResult Yes (ret: SDKERR, reason: string, pathInfo: UserSavePathInfo) => void Callback of setting the save path.
Table 2 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, pathInfo: UserSavePathInfo) => void

Table 3 Input parameter description
Parameter Type Description
ret For details about SDKERR, see Error Code Reference. Error code.
reason string Error description.
pathInfo UserSavePathInfo Save path information.
Table 4 UserSavePathInfo
Parameter Type Description
pathType SavePathType Save path type.
path string Save path. The value is an absolute path and must be encoded in UTF-8.