You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -39,7 +62,7 @@ public TLSSigAPIv2(long sdkappid, String key) {
39
62
* @param userid - User ID. The value can be up to 32 bytes in length and contain letters (a-z and A-Z), digits (0-9), underscores (_), and hyphens (-).
40
63
* @param expire - UserSig expiration time, in seconds. For example, 86400 indicates that the generated UserSig will expire one day after being generated.
@@ -75,26 +98,26 @@ public String genUserSig(String userid, long expire) {
75
98
* Function:
76
99
* Used to issue PrivateMapKey that is optional for room entry.
77
100
* PrivateMapKey must be used together with UserSig but with more powerful permission control capabilities.
78
-
* - UserSig can only control whether a UserID has permission to use the TRTC service. As long as the UserSig is correct, the user with the corresponding UserID can enter or leave any room.
79
-
* - PrivateMapKey specifies more stringent permissions for a UserID, including whether the UserID can be used to enter a specific room and perform audio/video upstreaming in the room.
101
+
* - UserSig can only control whether a UserID has permission to use the TRTC service. As long as the UserSig is correct, the user with the corresponding UserID can enter or leave any room.
102
+
* - PrivateMapKey specifies more stringent permissions for a UserID, including whether the UserID can be used to enter a specific room and perform audio/video upstreaming in the room.
80
103
* To enable stringent PrivateMapKey permission bit verification, you need to enable permission key in TRTC console > Application Management > Application Info.
81
-
*
104
+
* <p>
82
105
* Parameter description:
83
106
*
84
-
* @param userid - User ID. The value can be up to 32 bytes in length and contain letters (a-z and A-Z), digits (0-9), underscores (_), and hyphens (-).
85
-
* @param roomid - ID of the room to which the specified UserID can enter.
86
-
* @param expire - PrivateMapKey expiration time, in seconds. For example, 86400 indicates that the generated PrivateMapKey will expire one day after being generated.
107
+
* @param userid - User ID. The value can be up to 32 bytes in length and contain letters (a-z and A-Z), digits (0-9), underscores (_), and hyphens (-).
108
+
* @param roomid - ID of the room to which the specified UserID can enter.
109
+
* @param expire - PrivateMapKey expiration time, in seconds. For example, 86400 indicates that the generated PrivateMapKey will expire one day after being generated.
87
110
* @param privilegeMap - Permission bits. Eight bits in the same byte are used as the permission switches of eight specific features:
88
-
* - Bit 1: 0000 0001 = 1, permission for room creation
89
-
* - Bit 2: 0000 0010 = 2, permission for room entry
90
-
* - Bit 3: 0000 0100 = 4, permission for audio sending
91
-
* - Bit 4: 0000 1000 = 8, permission for audio receiving
92
-
* - Bit 5: 0001 0000 = 16, permission for video sending
93
-
* - Bit 6: 0010 0000 = 32, permission for video receiving
94
-
* - Bit 7: 0100 0000 = 64, permission for substream video sending (screen sharing)
95
-
* - Bit 8: 1000 0000 = 200, permission for substream video receiving (screen sharing)
96
-
* - privilegeMap == 1111 1111 == 255: Indicates that the UserID has all feature permissions of the room specified by roomid.
97
-
* - privilegeMap == 0010 1010 == 42: Indicates that the UserID has only the permissions to enter the room and receive audio/video data.
111
+
* - Bit 1: 0000 0001 = 1, permission for room creation
112
+
* - Bit 2: 0000 0010 = 2, permission for room entry
113
+
* - Bit 3: 0000 0100 = 4, permission for audio sending
114
+
* - Bit 4: 0000 1000 = 8, permission for audio receiving
115
+
* - Bit 5: 0001 0000 = 16, permission for video sending
116
+
* - Bit 6: 0010 0000 = 32, permission for video receiving
117
+
* - Bit 7: 0100 0000 = 64, permission for substream video sending (screen sharing)
118
+
* - Bit 8: 1000 0000 = 200, permission for substream video receiving (screen sharing)
119
+
* - privilegeMap == 1111 1111 == 255: Indicates that the UserID has all feature permissions of the room specified by roomid.
120
+
* - privilegeMap == 0010 1010 == 42: Indicates that the UserID has only the permissions to enter the room and receive audio/video data.
98
121
* @return usersig - Generate signature with userbuf
@@ -133,27 +156,26 @@ public String genPrivateMapKey(String userid, long expire, long roomid, long pri
133
156
* Function:
134
157
* Used to issue PrivateMapKey that is optional for room entry.
135
158
* PrivateMapKey must be used together with UserSig but with more powerful permission control capabilities.
136
-
* - UserSig can only control whether a UserID has permission to use the TRTC service. As long as the UserSig is correct, the user with the corresponding UserID can enter or leave any room.
137
-
* - PrivateMapKey specifies more stringent permissions for a UserID, including whether the UserID can be used to enter a specific room and perform audio/video upstreaming in the room.
159
+
* - UserSig can only control whether a UserID has permission to use the TRTC service. As long as the UserSig is correct, the user with the corresponding UserID can enter or leave any room.
160
+
* - PrivateMapKey specifies more stringent permissions for a UserID, including whether the UserID can be used to enter a specific room and perform audio/video upstreaming in the room.
138
161
* To enable stringent PrivateMapKey permission bit verification, you need to enable permission key in TRTC console > Application Management > Application Info.
139
-
*
162
+
* <p>
140
163
* Parameter description:
141
164
*
142
-
*
143
-
* @param userid - User ID. The value can be up to 32 bytes in length and contain letters (a-z and A-Z), digits (0-9), underscores (_), and hyphens (-).
144
-
* @param roomid - ID of the room to which the specified UserID can enter.
145
-
* @param expire - PrivateMapKey expiration time, in seconds. For example, 86400 indicates that the generated PrivateMapKey will expire one day after being generated.
165
+
* @param userid - User ID. The value can be up to 32 bytes in length and contain letters (a-z and A-Z), digits (0-9), underscores (_), and hyphens (-).
166
+
* @param roomid - ID of the room to which the specified UserID can enter.
167
+
* @param expire - PrivateMapKey expiration time, in seconds. For example, 86400 indicates that the generated PrivateMapKey will expire one day after being generated.
146
168
* @param privilegeMap - Permission bits. Eight bits in the same byte are used as the permission switches of eight specific features:
147
-
* - Bit 1: 0000 0001 = 1, permission for room creation
148
-
* - Bit 2: 0000 0010 = 2, permission for room entry
149
-
* - Bit 3: 0000 0100 = 4, permission for audio sending
150
-
* - Bit 4: 0000 1000 = 8, permission for audio receiving
151
-
* - Bit 5: 0001 0000 = 16, permission for video sending
152
-
* - Bit 6: 0010 0000 = 32, permission for video receiving
153
-
* - Bit 7: 0100 0000 = 64, permission for substream video sending (screen sharing)
154
-
* - Bit 8: 1000 0000 = 200, permission for substream video receiving (screen sharing)
155
-
* - privilegeMap == 1111 1111 == 255: Indicates that the UserID has all feature permissions of the room specified by roomid.
156
-
* - privilegeMap == 0010 1010 == 42: Indicates that the UserID has only the permissions to enter the room and receive audio/video data.
169
+
* - Bit 1: 0000 0001 = 1, permission for room creation
170
+
* - Bit 2: 0000 0010 = 2, permission for room entry
171
+
* - Bit 3: 0000 0100 = 4, permission for audio sending
172
+
* - Bit 4: 0000 1000 = 8, permission for audio receiving
173
+
* - Bit 5: 0001 0000 = 16, permission for video sending
174
+
* - Bit 6: 0010 0000 = 32, permission for video receiving
175
+
* - Bit 7: 0100 0000 = 64, permission for substream video sending (screen sharing)
176
+
* - Bit 8: 1000 0000 = 200, permission for substream video receiving (screen sharing)
177
+
* - privilegeMap == 1111 1111 == 255: Indicates that the UserID has all feature permissions of the room specified by roomid.
178
+
* - privilegeMap == 0010 1010 == 42: Indicates that the UserID has only the permissions to enter the room and receive audio/video data.
157
179
* @return usersig - Generate signature with userbuf
0 commit comments