trtc-sdk-v5 5.3.0-beta.9 → 5.3.1-beta.1

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
@@ -684,7 +684,7 @@
684
684
  readonly VIDEO_PLAY_STATE_CHANGED: "video-play-state-changed";
685
685
  /**
686
686
  * @description Notification event for local screen sharing stop, only valid for local screen sharing streams.
687
- * @default 'screen-sharing-stopped'
687
+ * @default 'screen-share-stopped'
688
688
  * @memberof module:EVENT
689
689
  * @example
690
690
  * trtc.on(TRTC.EVENT.SCREEN_SHARE_STOPPED, () => {
@@ -747,6 +747,7 @@
747
747
  */
748
748
  readonly STATISTICS: "statistics";
749
749
  /**
750
+ * @since v5.3.0
750
751
  * @description SEI message received<br>
751
752
  * @default 'sei-message'
752
753
  * @memberof module:EVENT
@@ -757,7 +758,7 @@
757
758
  */
758
759
  readonly SEI_MESSAGE: "sei-message";
759
760
  /**
760
- * @private
761
+ * @since v5.3.0
761
762
  * @description a new MediaStreamTrack object received.
762
763
  * @default 'track'
763
764
  * @memberof module:EVENT
@@ -948,6 +949,9 @@
948
949
  * @param {string} role User role
949
950
  * - 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
951
  * - 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.
952
+ * @param {object} [option]
953
+ * @param {string} [option.privateMapKey] `Since v5.3.0+` <br>
954
+ * The privateMapKey may expire after a timeout, so you can use this parameter to update the privateMapKey.
951
955
  * @throws
952
956
  * - {@link module:ERROR_CODE.INVALID_PARAMETER INVALID_PARAMETER}
953
957
  * - {@link module:ERROR_CODE.INVALID_OPERATION INVALID_OPERATION}
@@ -964,8 +968,13 @@
964
968
  *
965
969
  * // TRTC.TYPE.SCENE_LIVE interactive live streaming mode, anchor switches to audience
966
970
  * await trtc.switchRole(TRTC.TYPE.ROLE_AUDIENCE);
971
+ * @example
972
+ * // Since v5.3.0+
973
+ * await trtc.switchRole(TRTC.TYPE.ROLE_ANCHOR, { privateMapKey: 'your new privateMapKey' });
967
974
  */
968
- switchRole(role: UserRole): Promise<void>;
975
+ switchRole(role: UserRole, option?: {
976
+ privateMapKey: string;
977
+ }): Promise<void>;
969
978
  /**
970
979
  * Destroy the TRTC instance <br/>
971
980
  *
@@ -1670,7 +1679,7 @@
1670
1679
  /**
1671
1680
  * Returns the list of speaker devices
1672
1681
  * <br>
1673
- * 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.
1682
+ * 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.
1674
1683
  * @returns {Promise.<MediaDeviceInfo[]>} Promise returns an array of {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo|MediaDeviceInfo}
1675
1684
  */
1676
1685
  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.9",
3
+ "version": "5.3.1-beta.1",
4
4
  "description": "Tencent Cloud RTC SDK for Web",
5
5
  "main": "trtc.js",
6
6
  "types": "index.d.ts",