larksr_websdk 3.2.321 → 3.2.324

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.
@@ -38,6 +38,7 @@ export interface GetTaskResult {
38
38
  audioInputAutoStart: number;
39
39
  videoInput: number;
40
40
  videoInputAutoStart: number;
41
+ liveStreaming: number;
41
42
  }
42
43
  export interface StartAppInfo {
43
44
  appliId: string;
@@ -83,6 +84,9 @@ export default class API {
83
84
  private static PocHostApplGetUrl;
84
85
  private static TaskInfoClientStartedPath;
85
86
  private static PortMappingListPath;
87
+ private static GetTouchCtrMappingPath;
88
+ private static GetAppliListPath;
89
+ private static RegionListPath;
86
90
  static HostAppliGetUrl(params: {
87
91
  appliId: string;
88
92
  playerMode?: number;
@@ -120,5 +124,8 @@ export default class API {
120
124
  static ClientInfo(config: ILarkSRConfig, params: AppliParams): void;
121
125
  static TaskInfoClientStarted(config: ILarkSRConfig, params: AppliParams): void;
122
126
  static PortMappingList(config: ILarkSRConfig): Promise<unknown>;
127
+ static GetTouchCtrMapping(server: string, appliId?: string): Promise<unknown>;
128
+ static GetAppliList(server: string, params: any): Promise<unknown>;
129
+ static RegionList(server: string, params: any): Promise<unknown>;
123
130
  static joinParam(params: any): string;
124
131
  }
@@ -195,6 +195,7 @@ export interface IAppliParams {
195
195
  audioInputAutoStart: boolean;
196
196
  videoInput: boolean;
197
197
  videoInputAutoStart: boolean;
198
+ liveStreaming: boolean;
198
199
  }
199
200
  export declare enum AppliType {
200
201
  DESKTOP = 1,
@@ -259,6 +260,7 @@ export declare class AppliParams implements IAppliParams {
259
260
  audioInputAutoStart: boolean;
260
261
  videoInput: boolean;
261
262
  videoInputAutoStart: boolean;
263
+ liveStreaming: boolean;
262
264
  static copyAndCreate(params?: IAppliParams): AppliParams;
263
265
  static setUpWithSDKConfig(params: IAppliParams, config: ILarkSRConfig): AppliParams;
264
266
  }
@@ -43,7 +43,9 @@ export declare enum APP_EVENT_TYPE {
43
43
  AI_VOICE_STATUS = 18,
44
44
  AI_VOICE_ASR_RESULT = 19,
45
45
  AI_VOICE_DM_RESULT = 20,
46
- AI_VOICE_ERROR = 21
46
+ AI_VOICE_ERROR = 21,
47
+ RTMP_STREAM_STATE = 22,
48
+ RTMP_STREAM_ERROR = 23
47
49
  }
48
50
  export interface AppEvent extends LocalEvent<APP_EVENT_TYPE> {
49
51
  data?: any;
@@ -114,6 +116,8 @@ export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
114
116
  private onAudioRemoteStream;
115
117
  private onRtcError;
116
118
  private onRtcInfo;
119
+ private onRtmpStreamingState;
120
+ private onRtmpStreamingError;
117
121
  private onIceStateChange;
118
122
  retryPeerconnection(): void;
119
123
  setAudioEnable(enable: boolean): void | undefined;
@@ -151,6 +155,8 @@ export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
151
155
  addMediaTrack(track: MediaStreamTrack, ...streams: MediaStream[]): boolean | undefined;
152
156
  removeMediaTrack(track: RTCRtpSender): boolean | undefined;
153
157
  requestUserMediaPermission(constraints?: MediaStreamConstraints): Promise<MediaStream> | undefined;
158
+ StartCloudLiveStreaming(params: Msg.CloudLark.IRtmp_Start): Promise<void> | undefined;
159
+ StopLiveStreaming(): void | undefined;
154
160
  private onPeerConnectionDisconnect;
155
161
  private onBadNetwork;
156
162
  private onPixelStreamingPlayerList;
@@ -30,7 +30,9 @@ export declare enum WEBRTC_EVENT_TYPE {
30
30
  AI_VOICE_ASR_RESULT = 19,
31
31
  AI_VOICE_DM_RESULT = 20,
32
32
  AI_VOICE_ERROR = 21,
33
- INFO = 22
33
+ RTMP_STREAM_STATE = 22,
34
+ RTMP_STREAM_ERROR = 23,
35
+ INFO = 24
34
36
  }
35
37
  export interface GoogleBitRate {
36
38
  start: number;
@@ -157,6 +159,8 @@ export default class PeerConnection extends EventBase<WEBRTC_EVENT_TYPE, WebRTCE
157
159
  sendBuffer(buffer: ArrayBuffer): void;
158
160
  sendToAppTextMsg(msg: string): void;
159
161
  sendToAppBinaryMsg(binary: Uint8Array): void;
162
+ StartCloudLiveStreaming(params: Input.CloudLark.IRtmp_Start): Promise<void>;
163
+ StopLiveStreaming(): void;
160
164
  changeOperater(uid: number): void;
161
165
  inputText(txt: string): void;
162
166
  private getStats;
@@ -180,7 +180,22 @@ declare enum LarkSRClientEvent {
180
180
  /**
181
181
  * 对话出错详细信息
182
182
  */
183
- AI_VOICE_ERROR = "aivoiceerror"
183
+ AI_VOICE_ERROR = "aivoiceerror",
184
+ /**
185
+ * 服务端 3.2.7.0 添加
186
+ *
187
+ */
188
+ TOUCH_CTR_MAPPING = "touchctrmapping",
189
+ /**
190
+ * 服务端 3.2.7.0 添加
191
+ * rtmp 直播推流状态
192
+ */
193
+ RTMP_STREAM_STATE = "rtmpstreamstate",
194
+ /**
195
+ * 服务端 3.2.7.0 添加
196
+ * rtmp 直播推流出错
197
+ */
198
+ RTMP_STREAM_ERROR = "rtmpstreamerror"
184
199
  }
185
200
  /**
186
201
  * LarkSR 发出的事件
@@ -443,6 +458,21 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
443
458
  * 是否显示移动端触摸点
444
459
  */
445
460
  set isEnableTouchPonit(enable: boolean);
461
+ set isEnableTouchPoint(enable: boolean);
462
+ /**
463
+ * 虚拟鼠标的当前位置,相对于整体容器
464
+ */
465
+ get virtualCursorPosition(): {
466
+ x: any;
467
+ y: any;
468
+ };
469
+ /**
470
+ * 虚拟鼠标的当前位置,内部缩放容器,与实际显示虚拟鼠标 CSS 样式相同
471
+ */
472
+ get virtualCursorPositionRaw(): {
473
+ x: any;
474
+ y: any;
475
+ };
446
476
  /**
447
477
  * 是否显示载入画面时底部文字
448
478
  */
@@ -888,6 +918,41 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
888
918
  addMediaTrack(track: MediaStreamTrack, ...streams: MediaStream[]): boolean | undefined;
889
919
  removeMediaTrack(track: RTCRtpSender): boolean | undefined;
890
920
  requestUserMediaPermission(constraints?: MediaStreamConstraints): Promise<MediaStream> | undefined;
921
+ /**
922
+ * 启动云端推流功能
923
+ * @param params {
924
+ * // rtmp push url 必须填
925
+ * path: "",
926
+ * //rtmp push key
927
+ * key: "",
928
+ * // 推流的宽
929
+ * width: 1280,
930
+ * // 推流的高
931
+ * height: 720,
932
+ * framerate: 30,
933
+ * // kbps
934
+ * bitrate: 1024 * 2,
935
+ * // 是否支持断线重连
936
+ * reconnect: true,
937
+ * //最大重连次数
938
+ * reconnectRetries: 3,
939
+ * //是否串流麦克风(语音输入支持的情况)
940
+ * voice: audioInput,
941
+ * }
942
+ * @returns Promise
943
+ */
944
+ StartCloudLiveStreaming(params: CloudLark.IRtmp_Start): Promise<void> | undefined;
945
+ /**
946
+ * 关闭云端推流功能
947
+ * @returns
948
+ */
949
+ StopLiveStreaming(): void | undefined;
950
+ /**
951
+ * 获取当前服务器应用手柄配置
952
+ * @param appliId 应用id,传空为当前应用
953
+ * @returns
954
+ */
955
+ getTouchCtrMapping(appliId?: string): Promise<unknown>;
891
956
  $emit(type: LarkEventType, data?: any, message?: string): void;
892
957
  $emitError(message?: string, code?: number): void;
893
958
  $emitInfo(message?: string, code?: number): void;