Constructor
new TRTCParams(sdkAppId, userId, userSig, roomId, strRoomId, role, privateMapKey, businessInfo, streamId, userDefineRecordId)
As the room entry parameters in the TRTC SDK, these parameters must be correctly set so that the user can successfully enter the audio/video room specified by roomId
or strRoomId
.
For historical reasons, TRTC supports two types of room IDs: roomId
and strRoomId
.
Notice: do not mix roomId
and strRoomId
, because they are not interchangeable. For example, the number 123
and the string 123
are two completely different rooms in TRTC.
Parameters:
Name | Type | Description |
---|---|---|
sdkAppId |
Number |
required
[Field description] application ID, which is required. Tencent Cloud generates bills based on |
userId |
String |
required
[Field description] user ID, which is required. It is the |
userSig |
String |
required
[Field description] user signature, which is required. It is the authentication signature corresponding to the current |
roomId |
Number |
required
[Field description] numeric room ID. Users (userId) in the same room can see one another and make audio/video calls. |
strRoomId |
String |
required
[Field description] string-type room ID. Users (userId) in the same room can see one another and make audio/video calls. |
role |
TRTCRoleType |
required
[Field description] role in the live streaming scenario, which is applicable only to the live streaming scenario ( |
privateMapKey |
String |
required
[Field description] permission credential used for permission control, which is optional. If you want only users with the specified |
businessInfo |
String |
required
[Field description] business data, which is optional. This field is needed only by some advanced features. |
streamId |
String |
required
[Field description] specified |
userDefineRecordId |
String |
required
[Field description] on-cloud recording field, which is optional and used to specify whether to record the user's audio/video stream in the cloud. |