trtc-sdk-v5 5.3.0-beta.12 → 5.3.0-beta.14

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 CHANGED
@@ -131,7 +131,6 @@
131
131
  declare enum TRTCDeviceAction {
132
132
  Remove = "remove",
133
133
  Add = "add",
134
- Change = "change",
135
134
  Active = "active"
136
135
  }
137
136
  declare interface RTCErrorParams {
@@ -684,7 +683,7 @@
684
683
  readonly VIDEO_PLAY_STATE_CHANGED: "video-play-state-changed";
685
684
  /**
686
685
  * @description Notification event for local screen sharing stop, only valid for local screen sharing streams.
687
- * @default 'screen-sharing-stopped'
686
+ * @default 'screen-share-stopped'
688
687
  * @memberof module:EVENT
689
688
  * @example
690
689
  * trtc.on(TRTC.EVENT.SCREEN_SHARE_STOPPED, () => {
@@ -948,6 +947,9 @@
948
947
  * @param {string} role User role
949
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.
950
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.
951
953
  * @throws
952
954
  * - {@link module:ERROR_CODE.INVALID_PARAMETER INVALID_PARAMETER}
953
955
  * - {@link module:ERROR_CODE.INVALID_OPERATION INVALID_OPERATION}
@@ -964,8 +966,13 @@
964
966
  *
965
967
  * // TRTC.TYPE.SCENE_LIVE interactive live streaming mode, anchor switches to audience
966
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' });
967
972
  */
968
- switchRole(role: UserRole): Promise<void>;
973
+ switchRole(role: UserRole, option?: {
974
+ privateMapKey: string;
975
+ }): Promise<void>;
969
976
  /**
970
977
  * Destroy the TRTC instance <br/>
971
978
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trtc-sdk-v5",
3
- "version": "5.3.0-beta.12",
3
+ "version": "5.3.0-beta.14",
4
4
  "description": "Tencent Cloud RTC SDK for Web",
5
5
  "main": "trtc.js",
6
6
  "types": "index.d.ts",