Skip to content

Commit a09cc18

Browse files
author
yutingzeng
committed
增加用户进房权限构造userBuf说明
1 parent 474b4f9 commit a09cc18

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/main/java/com/tencentyun/TLSSigAPIv2.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,17 @@ private String genSig(String identifier, long expire, byte[] userbuf) {
7777
return (new String(Base64URL.base64EncodeUrl(Arrays.copyOfRange(compressedBytes,
7878
0, compressedBytesLength)))).replaceAll("\\s*", "");
7979
}
80+
/**用于生成实时音视频(TRTC)业务进房权限加密串,具体用途用法参考TRTC文档:https://cloud.tencent.com/document/product/647/32240
81+
* TRTC业务进房权限加密串需使用用户定义的userbuf
82+
* @brief 生成 userbuf
83+
* @param account 用户名
84+
* @param dwSdkappid sdkappid
85+
* @param dwAuthID 数字房间号
86+
* @param dwExpTime 过期时间:该权限加密串的过期时间,建议300秒,300秒内拿到该签名,并且发起进房间操作
87+
* @param dwPrivilegeMap 用户权限,255表示所有权限
88+
* @param dwAccountType 用户类型,默认为0
89+
* @return byte[] userbuf
90+
*/
8091
public byte[] genUserBuf(String account ,long dwAuthID, long dwExpTime ,
8192
long dwPrivilegeMap ,long dwAccountType){
8293
//视频校验位需要用到的字段

0 commit comments

Comments
 (0)