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

Setting the Sharing Permission

Function

This API is used to set the sharing permission. By default, sharing is allowed.

Function Prototype

setShareScreenPermission(permission: SharePermission, onSetShareScreenPermissionResult?: (ret: SDKERR, reason: string) => void): voidsetShareScreenPermission(permission: SharePermission, onSetShareScreenPermissionResult?: (ret: SDKERR, reason: string) => void): void

Request Parameters

Table 1 Input parameter description
Parameter Mandatory Type Description
permission Y SharePermission Permission type information.
onSetShareScreenPermissionResult Y (ret: SDKERR, reason: string) => void Callback of setting the sharing permission.
Table 2 SharePermission
Parameter Mandatory Type Description
isAllowed Y boolean Whether to disable sharing.

Return Values

void

Callback Method Parameters

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

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