trtc-cloud-js-sdk 2.12.2-beta.3 → 2.12.2-beta.31
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/package.json +2 -2
- package/trtc-cloud-js-sdk.d.ts +128 -8
- package/trtc-cloud-js-sdk.esm.js +1 -1
- package/trtc-cloud-js-sdk.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trtc-cloud-js-sdk",
|
|
3
|
-
"version": "2.12.2-beta.
|
|
3
|
+
"version": "2.12.2-beta.31",
|
|
4
4
|
"description": "Tencent Cloud RTC SDK for Web And Electron",
|
|
5
5
|
"main": "trtc-cloud-js-sdk.js",
|
|
6
6
|
"module": "trtc-cloud-js-sdk.esm.js",
|
|
@@ -19,6 +19,6 @@
|
|
|
19
19
|
"author": "Tencent Cloud Client R&D Center",
|
|
20
20
|
"license": "ISC",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"trtc-sdk-v5": "5.18.
|
|
22
|
+
"trtc-sdk-v5": "5.18.2-kit.2"
|
|
23
23
|
}
|
|
24
24
|
}
|
package/trtc-cloud-js-sdk.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import EventEmitter from 'eventemitter3';
|
|
|
2
2
|
import { VirtualBackground } from 'trtc-sdk-v5/plugins/video-effect/virtual-background';
|
|
3
3
|
import { BasicBeauty } from 'trtc-sdk-v5/plugins/video-effect/basic-beauty';
|
|
4
4
|
import VideoMixer from 'trtc-sdk-v5/plugins/video-effect/video-mixer';
|
|
5
|
+
import Whiteboard from 'trtc-sdk-v5/plugins/whiteboard';
|
|
5
6
|
|
|
6
7
|
declare enum TRTCVideoResolution {
|
|
7
8
|
TRTCVideoResolution_120_120 = 1,
|
|
@@ -780,11 +781,14 @@ interface ITRTCMediaMixingManager {
|
|
|
780
781
|
addMediaSource(mediaSource: TRTCMediaSource): Promise<void>;
|
|
781
782
|
removeMediaSource(mediaSource: TRTCMediaSource): Promise<void>;
|
|
782
783
|
updateMediaSource(mediaSource: TRTCMediaSource): Promise<void>;
|
|
783
|
-
startPublish(
|
|
784
|
+
startPublish(options?: {
|
|
785
|
+
streamType?: TRTCVideoStreamType;
|
|
786
|
+
}): Promise<void>;
|
|
784
787
|
stopPublish(): Promise<void>;
|
|
785
788
|
updatePublishParams(params: TRTCMediaMixingEncParam): Promise<void>;
|
|
786
|
-
bindPreviewArea(view: HTMLElement | null): void
|
|
787
|
-
|
|
789
|
+
bindPreviewArea(view: HTMLElement | null): Promise<void>;
|
|
790
|
+
updatePreviewArea(view: HTMLElement | null): Promise<void>;
|
|
791
|
+
destroy(): Promise<void>;
|
|
788
792
|
on(event: string, func: (...args: any[]) => void): void;
|
|
789
793
|
off(event: string, func: (...args: any[]) => void): void;
|
|
790
794
|
}
|
|
@@ -813,6 +817,7 @@ declare class TRTCMediaMixingManager implements ITRTCMediaMixingManager {
|
|
|
813
817
|
private sourceList;
|
|
814
818
|
private trtcSourceMap;
|
|
815
819
|
private mixVideoTrack;
|
|
820
|
+
private publishStreamType;
|
|
816
821
|
private selectedSource;
|
|
817
822
|
private logger;
|
|
818
823
|
private trtc;
|
|
@@ -853,6 +858,7 @@ declare class TRTCMediaMixingManager implements ITRTCMediaMixingManager {
|
|
|
853
858
|
* mediaMixingManager.bindPreviewArea( previewDOM);
|
|
854
859
|
*/
|
|
855
860
|
bindPreviewArea(view: HTMLElement | null): Promise<void>;
|
|
861
|
+
updatePreviewArea(view: HTMLElement | null): Promise<void>;
|
|
856
862
|
private _getTRTCSourceKey;
|
|
857
863
|
private _getTRTCFillMode;
|
|
858
864
|
private _getTRTCVideoProfile;
|
|
@@ -881,9 +887,13 @@ declare class TRTCMediaMixingManager implements ITRTCMediaMixingManager {
|
|
|
881
887
|
updateMediaSource(mediaSource: TRTCMediaSource): Promise<void>;
|
|
882
888
|
/**
|
|
883
889
|
* 开始推流
|
|
890
|
+
* @param options {Object} - 推流参数,可选
|
|
891
|
+
* @param options.streamType {TRTCVideoStreamType} - 混流输出推流目标,默认主流。
|
|
884
892
|
* @returns {Promise<void>}
|
|
885
893
|
*/
|
|
886
|
-
startPublish(
|
|
894
|
+
startPublish(options?: {
|
|
895
|
+
streamType?: TRTCVideoStreamType;
|
|
896
|
+
}): Promise<void>;
|
|
887
897
|
/**
|
|
888
898
|
* 停止推流
|
|
889
899
|
* @returns {Promise<void>}
|
|
@@ -925,6 +935,107 @@ declare class TRTCMediaMixingManager implements ITRTCMediaMixingManager {
|
|
|
925
935
|
private unselectMediaSource;
|
|
926
936
|
}
|
|
927
937
|
|
|
938
|
+
declare type WhiteboardToolType = 'pen' | 'rect' | 'ellipse' | 'arrow' | 'laser' | 'eraserObject';
|
|
939
|
+
declare type WhiteboardOp = 'undo' | 'redo' | 'clearall';
|
|
940
|
+
declare type WhiteboardSessionStalledReason = 'silence' | 'queue-full';
|
|
941
|
+
declare enum TRTCWhiteboardEvent {
|
|
942
|
+
STARTED = "started",
|
|
943
|
+
STOPPED = "stopped",
|
|
944
|
+
ERROR = "error",
|
|
945
|
+
STALLED = "stalled",
|
|
946
|
+
RESUMED = "resumed",
|
|
947
|
+
UNDO_STATE_CHANGED = "undo-state-changed",
|
|
948
|
+
REDO_STATE_CHANGED = "redo-state-changed"
|
|
949
|
+
}
|
|
950
|
+
interface WhiteboardToolConfig {
|
|
951
|
+
type?: WhiteboardToolType;
|
|
952
|
+
color?: string | number;
|
|
953
|
+
line_width?: number;
|
|
954
|
+
laserFadeDuration?: number;
|
|
955
|
+
}
|
|
956
|
+
declare const WhiteboardToolConfig: any;
|
|
957
|
+
interface WhiteboardCanvasInfo {
|
|
958
|
+
width: number;
|
|
959
|
+
height: number;
|
|
960
|
+
}
|
|
961
|
+
declare const WhiteboardCanvasInfo: any;
|
|
962
|
+
interface WhiteboardRecvCommand {
|
|
963
|
+
enable: number;
|
|
964
|
+
stroke_id?: string;
|
|
965
|
+
op?: WhiteboardOp;
|
|
966
|
+
owner_id?: string;
|
|
967
|
+
view_handle?: number | string | HTMLElement;
|
|
968
|
+
canvas?: WhiteboardCanvasInfo;
|
|
969
|
+
tool?: WhiteboardToolConfig;
|
|
970
|
+
whiteboard?: {
|
|
971
|
+
interactive?: boolean;
|
|
972
|
+
};
|
|
973
|
+
is_first?: boolean;
|
|
974
|
+
color?: string | number;
|
|
975
|
+
lw?: number;
|
|
976
|
+
xs?: string;
|
|
977
|
+
ys?: string;
|
|
978
|
+
}
|
|
979
|
+
declare const WhiteboardRecvCommand: any;
|
|
980
|
+
interface WhiteboardSendPayload {
|
|
981
|
+
id: string;
|
|
982
|
+
is_first?: boolean;
|
|
983
|
+
tool?: WhiteboardToolType;
|
|
984
|
+
color?: string;
|
|
985
|
+
lw?: number;
|
|
986
|
+
xs?: string;
|
|
987
|
+
ys?: string;
|
|
988
|
+
op?: WhiteboardOp;
|
|
989
|
+
}
|
|
990
|
+
declare const WhiteboardSendPayload: any;
|
|
991
|
+
interface WhiteboardSessionStalledInfo {
|
|
992
|
+
targetUser: string;
|
|
993
|
+
pendingCount: number;
|
|
994
|
+
reason: WhiteboardSessionStalledReason;
|
|
995
|
+
}
|
|
996
|
+
declare const WhiteboardSessionStalledInfo: any;
|
|
997
|
+
interface WhiteboardSessionResumedInfo {
|
|
998
|
+
targetUser: string;
|
|
999
|
+
resentCount: number;
|
|
1000
|
+
}
|
|
1001
|
+
declare const WhiteboardSessionResumedInfo: any;
|
|
1002
|
+
interface WhiteboardHistoryStateChangedInfo {
|
|
1003
|
+
available: boolean;
|
|
1004
|
+
}
|
|
1005
|
+
declare const WhiteboardHistoryStateChangedInfo: any;
|
|
1006
|
+
interface ITRTCWhiteboardManager {
|
|
1007
|
+
onRecvWhiteboardCommand(command: WhiteboardRecvCommand): Promise<void>;
|
|
1008
|
+
destroy(): Promise<void>;
|
|
1009
|
+
on(event: string, func: (...args: any[]) => void): void;
|
|
1010
|
+
off(event: string, func: (...args: any[]) => void): void;
|
|
1011
|
+
}
|
|
1012
|
+
declare const ITRTCWhiteboardManager: any;
|
|
1013
|
+
|
|
1014
|
+
declare class TRTCWhiteboardManager implements ITRTCWhiteboardManager {
|
|
1015
|
+
static whiteboardManager: TRTCWhiteboardManager | null;
|
|
1016
|
+
private trtc;
|
|
1017
|
+
private readonly eventEmitter;
|
|
1018
|
+
private pluginEventHandlers;
|
|
1019
|
+
private boundPlugin;
|
|
1020
|
+
private started;
|
|
1021
|
+
constructor(options: {
|
|
1022
|
+
trtc: any;
|
|
1023
|
+
});
|
|
1024
|
+
onRecvWhiteboardCommand(command: WhiteboardRecvCommand): Promise<void>;
|
|
1025
|
+
private _start;
|
|
1026
|
+
private _update;
|
|
1027
|
+
private _stop;
|
|
1028
|
+
private _applyLocalOp;
|
|
1029
|
+
private _bindPluginEvents;
|
|
1030
|
+
private _offPluginEvents;
|
|
1031
|
+
private _resetPluginEventBinding;
|
|
1032
|
+
private _getWhiteboardPlugin;
|
|
1033
|
+
private _emitWhiteboardEvent;
|
|
1034
|
+
on(event: string, func: (...args: any[]) => void): void;
|
|
1035
|
+
off(event: string, func: (...args: any[]) => void): void;
|
|
1036
|
+
destroy(): Promise<void>;
|
|
1037
|
+
}
|
|
1038
|
+
|
|
928
1039
|
/**
|
|
929
1040
|
* 转录参数
|
|
930
1041
|
*/
|
|
@@ -1058,6 +1169,7 @@ declare class AITranscriberManager implements IAITranscriberManager {
|
|
|
1058
1169
|
destroy(): void;
|
|
1059
1170
|
}
|
|
1060
1171
|
|
|
1172
|
+
declare const loggerManager: any;
|
|
1061
1173
|
declare class TRTC_Cloud extends EventEmitter {
|
|
1062
1174
|
static shareInstance: TRTC_Cloud | null;
|
|
1063
1175
|
static subCloudMap: Map<TRTC_Cloud, TRTC_Cloud>;
|
|
@@ -1127,7 +1239,7 @@ declare class TRTC_Cloud extends EventEmitter {
|
|
|
1127
1239
|
private _hasJoinedRoom;
|
|
1128
1240
|
private _isExitingRoom;
|
|
1129
1241
|
constructor(config?: ITRTCCloudConfig);
|
|
1130
|
-
static getPlugin(pluginName: string): typeof VirtualBackground | typeof BasicBeauty | typeof VideoMixer | null;
|
|
1242
|
+
static getPlugin(pluginName: string): typeof VirtualBackground | typeof BasicBeauty | typeof VideoMixer | typeof Whiteboard | null;
|
|
1131
1243
|
/**
|
|
1132
1244
|
* 创建 TRTCCloud 对象单例
|
|
1133
1245
|
* @param {ITRTCCloudConfig} config 构造函数初始化
|
|
@@ -1673,10 +1785,13 @@ declare class TRTC_Cloud extends EventEmitter {
|
|
|
1673
1785
|
* await trtcCloud.stopScreenShare();
|
|
1674
1786
|
*/
|
|
1675
1787
|
stopScreenShare(): Promise<void>;
|
|
1676
|
-
_startPublishVideoTrack({ videoTrack }: {
|
|
1788
|
+
_startPublishVideoTrack({ videoTrack, streamType }: {
|
|
1677
1789
|
videoTrack: MediaStreamTrack;
|
|
1790
|
+
streamType?: TRTCVideoStreamType;
|
|
1791
|
+
}): Promise<void>;
|
|
1792
|
+
_stopPublishVideoTrack({ streamType }?: {
|
|
1793
|
+
streamType?: TRTCVideoStreamType;
|
|
1678
1794
|
}): Promise<void>;
|
|
1679
|
-
_stopPublishVideoTrack(): Promise<void>;
|
|
1680
1795
|
startScreenCapture(): void;
|
|
1681
1796
|
pauseScreenCapture(): void;
|
|
1682
1797
|
resumeScreenCapture(): void;
|
|
@@ -2040,7 +2155,12 @@ declare class TRTC_Cloud extends EventEmitter {
|
|
|
2040
2155
|
* @returns {TRTCMediaMixingManager | null}
|
|
2041
2156
|
*/
|
|
2042
2157
|
getMediaMixingManager(): TRTCMediaMixingManager;
|
|
2158
|
+
/**
|
|
2159
|
+
* 获取互动白板管理器
|
|
2160
|
+
* @returns {TRTCWhiteboardManager}
|
|
2161
|
+
*/
|
|
2162
|
+
getWhiteboardManager(): TRTCWhiteboardManager;
|
|
2043
2163
|
getAITranscriberManager(): AITranscriberManager;
|
|
2044
2164
|
}
|
|
2045
2165
|
|
|
2046
|
-
export { AITranscriberListener, AudioMuteType, IAITranscriberManager, ITRTCMediaMixingEvent, ITRTCMediaMixingManager, InteractionOption, Rect, TRTCAppScene, TRTCAudioQuality, TRTCAudioSceneEx, TRTCBeautyStyle, TRTCCameraCaptureMode, TRTCCameraCaptureParams, TRTCDeviceInfo, TRTCDeviceState, TRTCDeviceType, TRTCImageBuffer, TRTCLocalStatistics, TRTCLogLevel, TRTCMediaMixingEncParam, TRTCMediaMixingErrorCode, TRTCMediaMixingEvent, TRTCMediaSource, TRTCMediaSourceType, TRTCMixInputType, TRTCMixUser, TRTCNetworkQosParam, TRTCParams, TRTCPublishCDNParam, TRTCQosControlMode, TRTCQuality, TRTCQualityInfo, TRTCRemoteStatistics, TRTCRenderParams, TRTCRoleType, TRTCScreenCaptureProperty, TRTCScreenCaptureSourceInfo, TRTCScreenCaptureSourceType, TRTCStatistics, TRTCTranscodingConfig, TRTCTranscodingConfigMode, TRTCVideoEncParam, TRTCVideoFillMode, TRTCVideoMirrorType, TRTCVideoQosPreference, TRTCVideoResolution, TRTCVideoResolutionMode, TRTCVideoRotation, TRTCVideoStreamType, TRTCVolumeInfo, TranscriberMessage, TranscriberParams, TRTC_Cloud as default };
|
|
2166
|
+
export { AITranscriberListener, AudioMuteType, IAITranscriberManager, ITRTCMediaMixingEvent, ITRTCMediaMixingManager, ITRTCWhiteboardManager, InteractionOption, Rect, TRTCAppScene, TRTCAudioQuality, TRTCAudioSceneEx, TRTCBeautyStyle, TRTCCameraCaptureMode, TRTCCameraCaptureParams, TRTCDeviceInfo, TRTCDeviceState, TRTCDeviceType, TRTCImageBuffer, TRTCLocalStatistics, TRTCLogLevel, TRTCMediaMixingEncParam, TRTCMediaMixingErrorCode, TRTCMediaMixingEvent, TRTCMediaSource, TRTCMediaSourceType, TRTCMixInputType, TRTCMixUser, TRTCNetworkQosParam, TRTCParams, TRTCPublishCDNParam, TRTCQosControlMode, TRTCQuality, TRTCQualityInfo, TRTCRemoteStatistics, TRTCRenderParams, TRTCRoleType, TRTCScreenCaptureProperty, TRTCScreenCaptureSourceInfo, TRTCScreenCaptureSourceType, TRTCStatistics, TRTCTranscodingConfig, TRTCTranscodingConfigMode, TRTCVideoEncParam, TRTCVideoFillMode, TRTCVideoMirrorType, TRTCVideoQosPreference, TRTCVideoResolution, TRTCVideoResolutionMode, TRTCVideoRotation, TRTCVideoStreamType, TRTCVolumeInfo, TRTCWhiteboardEvent, TranscriberMessage, TranscriberParams, WhiteboardCanvasInfo, WhiteboardHistoryStateChangedInfo, WhiteboardOp, WhiteboardRecvCommand, WhiteboardSendPayload, WhiteboardSessionResumedInfo, WhiteboardSessionStalledInfo, WhiteboardSessionStalledReason, WhiteboardToolConfig, WhiteboardToolType, TRTC_Cloud as default, loggerManager };
|