trtc-sdk-v5 5.4.3-beta.1 → 5.4.3-beta.4
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 +19 -5
- package/package.json +1 -1
- package/trtc.esm.js +3 -3
- package/trtc.js +1 -1
package/index.d.ts
CHANGED
|
@@ -1478,9 +1478,9 @@
|
|
|
1478
1478
|
*
|
|
1479
1479
|
* @param {string} [config] If not passed, get the local camera videoTrack
|
|
1480
1480
|
* @param {string} [config.userId] If not passed or passed an empty string, get the local videoTrack. Pass the userId of the remote user to get the remote user's videoTrack.
|
|
1481
|
-
* @param {STREAM_TYPE_MAIN|STREAM_TYPE_SUB} [config.streamType] -
|
|
1482
|
-
* - {@link module:TYPE.STREAM_TYPE_MAIN TRTC.TYPE.STREAM_TYPE_MAIN}: Main stream (
|
|
1483
|
-
* - {@link module:TYPE.STREAM_TYPE_SUB TRTC.TYPE.STREAM_TYPE_SUB}: Sub stream (
|
|
1481
|
+
* @param {STREAM_TYPE_MAIN|STREAM_TYPE_SUB} [config.streamType] - stream type:
|
|
1482
|
+
* - {@link module:TYPE.STREAM_TYPE_MAIN TRTC.TYPE.STREAM_TYPE_MAIN}: Main stream (user's camera)(default)
|
|
1483
|
+
* - {@link module:TYPE.STREAM_TYPE_SUB TRTC.TYPE.STREAM_TYPE_SUB}: Sub stream (user's screen sharing)
|
|
1484
1484
|
* @returns {MediaStreamTrack|null} Video track
|
|
1485
1485
|
* @memberof TRTC
|
|
1486
1486
|
* @example
|
|
@@ -1501,10 +1501,24 @@
|
|
|
1501
1501
|
* Get audio track
|
|
1502
1502
|
*
|
|
1503
1503
|
* @returns {MediaStreamTrack?} Audio track
|
|
1504
|
-
* @param {string} [
|
|
1504
|
+
* @param {Object|string} [config] If not passed, get the local microphone audioTrack
|
|
1505
|
+
* @param {string} [config.userId] If not passed or passed an empty string, get the local audioTrack. Pass the userId of the remote user to get the remote user's audioTrack.
|
|
1506
|
+
* @param {STREAM_TYPE_MAIN|STREAM_TYPE_SUB} [config.streamType] - stream type:
|
|
1507
|
+
* - {@link module:TYPE.STREAM_TYPE_MAIN TRTC.TYPE.STREAM_TYPE_MAIN}: Main stream (user's microphone)(default)
|
|
1508
|
+
* - {@link module:TYPE.STREAM_TYPE_SUB TRTC.TYPE.STREAM_TYPE_SUB}: Sub stream (user's screen sharing audio). Only works for local screen sharing audio because there is only one remote audioTrack, and there is no distinction between Main and Sub for remote audioTrack.
|
|
1505
1509
|
* @memberof TRTC
|
|
1510
|
+
* @example
|
|
1511
|
+
* // Version before v5.5.0
|
|
1512
|
+
* trtc.getAudioTrack(); // Get local microphone audioTrack, captured by trtc.startLocalAudio()
|
|
1513
|
+
* trtc.getAudioTrack('remoteUserId'); // Get remote audioTrack
|
|
1514
|
+
*
|
|
1515
|
+
* // Since v5.5.0+, you can get local screen audioTrack by passing the streamType = TRTC.STREAM_TYPE_SUB
|
|
1516
|
+
* trtc.getAudioTrack({ streamType: TRTC.STREAM_TYPE_SUB });
|
|
1506
1517
|
*/
|
|
1507
|
-
getAudioTrack(
|
|
1518
|
+
getAudioTrack(configOrUserId?: {
|
|
1519
|
+
userId?: string;
|
|
1520
|
+
streamType?: TRTCStreamType;
|
|
1521
|
+
} | string): MediaStreamTrack | null;
|
|
1508
1522
|
setCurrentSpeaker(speakerId: string): void;
|
|
1509
1523
|
/**
|
|
1510
1524
|
* Send SEI Message <br>
|