trtc-cloud-js-sdk 2.12.2-beta.21 → 2.12.2-beta.22

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trtc-cloud-js-sdk",
3
- "version": "2.12.2-beta.21",
3
+ "version": "2.12.2-beta.22",
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.2-beta.5"
22
+ "trtc-sdk-v5": "5.18.1"
23
23
  }
24
24
  }
@@ -1,8 +1,4 @@
1
1
  import EventEmitter from 'eventemitter3';
2
- import { VirtualBackground } from 'trtc-sdk-v5/plugins/video-effect/virtual-background';
3
- import { BasicBeauty } from 'trtc-sdk-v5/plugins/video-effect/basic-beauty';
4
- import VideoMixer from 'trtc-sdk-v5/plugins/video-effect/video-mixer';
5
- import Whiteboard from 'trtc-sdk-v5/plugins/whiteboard';
6
2
 
7
3
  declare enum TRTCVideoResolution {
8
4
  TRTCVideoResolution_120_120 = 1,
@@ -939,8 +935,6 @@ declare type WhiteboardToolType = 'pen' | 'rect' | 'ellipse' | 'arrow' | 'laser'
939
935
  declare type WhiteboardOp = 'undo' | 'redo' | 'clearall' | 'clearself';
940
936
  declare type WhiteboardSessionStalledReason = 'silence' | 'queue-full';
941
937
  declare enum TRTCWhiteboardEvent {
942
- /** 上行:本端笔迹/操作数据,需上层转发给远端 */
943
- onSendWhiteboardCommand = "onSendWhiteboardCommand",
944
938
  STARTED = "started",
945
939
  STOPPED = "stopped",
946
940
  ERROR = "error",
@@ -961,29 +955,12 @@ interface WhiteboardCanvasInfo {
961
955
  height: number;
962
956
  }
963
957
  declare const WhiteboardCanvasInfo: any;
964
- /**
965
- * 下行指令参数 —— 与 Native `OnRecvWhiteboardCommand` 的 `params` 对齐。
966
- *
967
- * 该指令承担两类职责:
968
- * 1. 配置/生命周期:`enable`、`canvas`、`tool`、`whiteboard.interactive`、`view_handle`
969
- * 2. 远端协同:`owner_id`、`stroke_id`、`op`,以及远端笔迹点数据(`xs`/`ys`/`tool`/`color`/`lw`)
970
- */
971
958
  interface WhiteboardRecvCommand {
972
- /** 1=启用, 0=关闭;关闭时其余字段忽略 */
973
959
  enable: number;
974
960
  stroke_id?: string;
975
961
  op?: WhiteboardOp;
976
- /** 操作/笔迹归属用户;存在时表示这是一条远端协同指令 */
977
962
  owner_id?: string;
978
- /**
979
- * 视图句柄。
980
- * - Native:int64 句柄
981
- * - Web:传入绑定事件的 DOM 元素或其 id(HTMLElement | string)。
982
- * 白板启动后再次传入时,会将现有画布和交互迁移到新的视图。
983
- */
984
963
  view_handle?: number | string | HTMLElement;
985
- /** 接收 Native 回调数据的实例句柄(Web 端忽略,仅为兼容 Native 透传) */
986
- whiteboard_delegate_handle?: number;
987
964
  canvas?: WhiteboardCanvasInfo;
988
965
  tool?: WhiteboardToolConfig;
989
966
  whiteboard?: {
@@ -996,9 +973,6 @@ interface WhiteboardRecvCommand {
996
973
  ys?: string;
997
974
  }
998
975
  declare const WhiteboardRecvCommand: any;
999
- /**
1000
- * 上行回调 payload —— 与 Native `OnSendWhiteboardCommand` 的 payload 对齐。
1001
- */
1002
976
  interface WhiteboardSendPayload {
1003
977
  id: string;
1004
978
  is_first?: boolean;
@@ -1025,16 +999,8 @@ interface WhiteboardHistoryStateChangedInfo {
1025
999
  available: boolean;
1026
1000
  }
1027
1001
  declare const WhiteboardHistoryStateChangedInfo: any;
1028
- interface WhiteboardDelegate {
1029
- onSendWhiteboardCommand(isNeedAck: boolean, payload: string): void;
1030
- }
1031
- declare const WhiteboardDelegate: any;
1032
1002
  interface ITRTCWhiteboardManager {
1033
- /** 设置上行数据回调(与 Native WhiteboardDelegate 对齐) */
1034
- setDelegate(delegate: WhiteboardDelegate | null): void;
1035
- /** 处理下行指令(对应 callExperimentalAPI 的 OnRecvWhiteboardCommand) */
1036
1003
  onRecvWhiteboardCommand(command: WhiteboardRecvCommand): Promise<void>;
1037
- /** 销毁,释放插件与监听 */
1038
1004
  destroy(): Promise<void>;
1039
1005
  on(event: string, func: (...args: any[]) => void): void;
1040
1006
  off(event: string, func: (...args: any[]) => void): void;
@@ -1047,16 +1013,13 @@ declare class TRTCWhiteboardManager implements ITRTCWhiteboardManager {
1047
1013
  private logger;
1048
1014
  private trtc;
1049
1015
  private eventEmitter;
1050
- private delegate;
1051
1016
  private pluginEventHandlers;
1052
1017
  private boundPlugin;
1053
1018
  private started;
1054
- private view;
1055
1019
  constructor(options: {
1056
1020
  logger: any;
1057
1021
  trtc: any;
1058
1022
  });
1059
- setDelegate(delegate: WhiteboardDelegate | null): void;
1060
1023
  onRecvWhiteboardCommand(command: WhiteboardRecvCommand): Promise<void>;
1061
1024
  private _start;
1062
1025
  private _update;
@@ -1067,23 +1030,9 @@ declare class TRTCWhiteboardManager implements ITRTCWhiteboardManager {
1067
1030
  private _resetPluginEventBinding;
1068
1031
  private _getWhiteboardPlugin;
1069
1032
  private _emitWhiteboardEvent;
1070
- /**
1071
- * 远端协同指令(带 owner_id)。
1072
- *
1073
- * 说明:Web `Whiteboard` 插件的跨端笔迹同步由插件内部通过 TRTC customMessage + SEI 自动完成
1074
- * (guest 在本地预览 canvas 绘制并同步给 host,host 合流进推流),无需上层 RoomEngine 转发
1075
- * 远端笔迹点数据。因此这里对远端笔迹数据(xs/ys)不做注入,仅记录日志,保持与 Native 契约形态一致。
1076
- */
1077
1033
  private _applyRemoteCommand;
1078
- private _buildToolGroup;
1079
- private _buildConfigGroup;
1080
- private _buildCanvasInfo;
1081
- private _opToOperation;
1082
- /**
1083
- * 颜色归一化:支持 '#RRGGBB' / '#AARRGGBB' / 0xAARRGGBB 整型 -> CSS 颜色字符串
1084
- */
1085
- private _normalizeColor;
1086
- private _resolveView;
1034
+ private _buildPluginOptions;
1035
+ private _buildOperationOptions;
1087
1036
  on(event: string, func: (...args: any[]) => void): void;
1088
1037
  off(event: string, func: (...args: any[]) => void): void;
1089
1038
  destroy(): Promise<void>;
@@ -1294,7 +1243,7 @@ declare class TRTC_Cloud extends EventEmitter {
1294
1243
  private _hasJoinedRoom;
1295
1244
  private _isExitingRoom;
1296
1245
  constructor(config?: ITRTCCloudConfig);
1297
- static getPlugin(pluginName: string): typeof VirtualBackground | typeof BasicBeauty | typeof VideoMixer | typeof Whiteboard | null;
1246
+ static getPlugin(pluginName: string): any;
1298
1247
  /**
1299
1248
  * 创建 TRTCCloud 对象单例
1300
1249
  * @param {ITRTCCloudConfig} config 构造函数初始化
@@ -2218,4 +2167,4 @@ declare class TRTC_Cloud extends EventEmitter {
2218
2167
  getAITranscriberManager(): AITranscriberManager;
2219
2168
  }
2220
2169
 
2221
- 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, WhiteboardDelegate, WhiteboardHistoryStateChangedInfo, WhiteboardOp, WhiteboardRecvCommand, WhiteboardSendPayload, WhiteboardSessionResumedInfo, WhiteboardSessionStalledInfo, WhiteboardSessionStalledReason, WhiteboardToolConfig, WhiteboardToolType, TRTC_Cloud as default, loggerManager };
2170
+ 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 };