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

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
@@ -78,7 +78,6 @@
78
78
  fillMode?: 'contain' | 'cover' | 'fill';
79
79
  mirror?: boolean;
80
80
  small?: boolean;
81
- receiveWhenViewVisible?: boolean;
82
81
  };
83
82
  }
84
83
  declare interface StopRemoteVideoConfig {
@@ -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
  *
@@ -1633,7 +1640,7 @@
1633
1640
  * <br>
1634
1641
  * **Note**
1635
1642
  * - This interface does not support use under the http protocol, please use the https protocol to deploy your website. {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#Privacy_and_security Privacy and security}
1636
- * - Calling this method may temporarily open the camera to ensure that the camera list can be normally obtained, and the SDK will automatically stop the camera capture later.
1643
+ * - Calling this method may temporarily open the camera to ensure that the camera list can be normally obtained, and the SDK will automatically release the camera capture later.
1637
1644
  * - You can call the browser's native interface [getCapabilities](https://developer.mozilla.org/en-US/docs/Web/API/InputDeviceInfo/getCapabilities) to get the maximum resolutions supported by the camera, frame rate, mobile devices to distinguish between front and rear cameras, etc. This interface supports Chrome 67+, Edge 79+, Safari 17+, Opera 54+.
1638
1645
  * @example
1639
1646
  * const cameraList = await TRTC.getCameraList();
@@ -1656,7 +1663,7 @@
1656
1663
  * <br>
1657
1664
  * **Note**
1658
1665
  * - This interface does not support use under the http protocol, please use the https protocol to deploy your website. {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#Privacy_and_security Privacy and security}
1659
- * - Calling this method may temporarily open the microphone to ensure that the microphone list can be normally obtained, and the SDK will automatically stop the microphone capture later.
1666
+ * - Calling this method may temporarily open the microphone to ensure that the microphone list can be normally obtained, and the SDK will automatically release the microphone capture later.
1660
1667
  * - You can call the browser's native interface [getCapabilities](https://developer.mozilla.org/en-US/docs/Web/API/InputDeviceInfo/getCapabilities) to get information about the microphone's capabilities, e.g. the maximum number of channels supported, etc. This interface supports Chrome 67+, Edge 79+, Safari 17+, Opera 54+.
1661
1668
  * @example
1662
1669
  * const microphoneList = await TRTC.getMicrophoneList();
@@ -1670,7 +1677,7 @@
1670
1677
  /**
1671
1678
  * Returns the list of speaker devices
1672
1679
  * <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.
1680
+ * 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
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.9",
3
+ "version": "5.3.0",
4
4
  "description": "Tencent Cloud RTC SDK for Web",
5
5
  "main": "trtc.js",
6
6
  "types": "index.d.ts",