trtc-sdk-v5 5.3.0-beta.12 → 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 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 {
@@ -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
  *
@@ -1670,7 +1677,7 @@
1670
1677
  /**
1671
1678
  * Returns the list of speaker devices
1672
1679
  * <br>
1673
- * Calling this method may temporarily open the microphone to ensure that the speaker list can be normally obtained, and the SDK will automatically release the microphone capture later.
1680
+ * For security reasons, the label and deviceId fields may be empty before the user authorizes access to the camera or microphone. Therefore, it is recommended to call this interface to obtain device details after the user authorizes access.
1674
1681
  * @returns {Promise.<MediaDeviceInfo[]>} Promise returns an array of {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo|MediaDeviceInfo}
1675
1682
  */
1676
1683
  static getSpeakerList(): Promise<DeviceInfo[]>;
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.13",
4
4
  "description": "Tencent Cloud RTC SDK for Web",
5
5
  "main": "trtc.js",
6
6
  "types": "index.d.ts",