trtc-sdk-v5 5.3.0-beta.11 → 5.3.0-beta.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +6 -0
- package/package.json +1 -1
- package/trtc.esm.js +15 -15
- package/trtc.js +1 -1
package/index.d.ts
CHANGED
|
@@ -947,6 +947,9 @@
|
|
|
947
947
|
* @param {string} role User role
|
|
948
948
|
* - TRTC.TYPE.ROLE_ANCHOR anchor, can publish local audio and video, up to 50 anchors can publish local audio and video in a single room at the same time.
|
|
949
949
|
* - TRTC.TYPE.ROLE_AUDIENCE audience, cannot publish local audio and video, can only watch remote streams, and there is no upper limit on the number of audience members in a single room.
|
|
950
|
+
* @param {object} [option]
|
|
951
|
+
* @param {string} [option.privateMapKey] `Since v5.3.0+` <br>
|
|
952
|
+
* The privateMapKey may expire after a timeout, so you can use this parameter to update the privateMapKey.
|
|
950
953
|
* @throws
|
|
951
954
|
* - {@link module:ERROR_CODE.INVALID_PARAMETER INVALID_PARAMETER}
|
|
952
955
|
* - {@link module:ERROR_CODE.INVALID_OPERATION INVALID_OPERATION}
|
|
@@ -963,6 +966,9 @@
|
|
|
963
966
|
*
|
|
964
967
|
* // TRTC.TYPE.SCENE_LIVE interactive live streaming mode, anchor switches to audience
|
|
965
968
|
* await trtc.switchRole(TRTC.TYPE.ROLE_AUDIENCE);
|
|
969
|
+
* @example
|
|
970
|
+
* // Since v5.3.0+
|
|
971
|
+
* await trtc.switchRole(TRTC.TYPE.ROLE_ANCHOR, { privateMapKey: 'your new privateMapKey' });
|
|
966
972
|
*/
|
|
967
973
|
switchRole(role: UserRole, option?: {
|
|
968
974
|
privateMapKey: string;
|