larksr_websdk 3.2.322 → 3.2.325
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/dist/doc/events.md +11 -1
- package/dist/doc/functions.md +52 -1
- package/dist/doc/update.md +12 -1
- package/dist/larksr-web-sdk.min.js +1 -1
- package/dist/types/api.d.ts +7 -0
- package/dist/types/appli_params.d.ts +2 -0
- package/dist/types/lark/application.d.ts +7 -1
- package/dist/types/lark/peer_connection.d.ts +5 -1
- package/dist/types/larksr.d.ts +56 -1
- package/dist/types/protobuf/cloudlark.d.ts +7855 -7384
- package/package.json +1 -1
- package/types/api.d.ts +7 -0
- package/types/appli_params.d.ts +2 -0
- package/types/lark/application.d.ts +7 -1
- package/types/lark/peer_connection.d.ts +5 -1
- package/types/larksr.d.ts +56 -1
- package/types/protobuf/cloudlark.d.ts +7855 -7384
package/dist/types/api.d.ts
CHANGED
|
@@ -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
|
-
|
|
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;
|
package/dist/types/larksr.d.ts
CHANGED
|
@@ -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 发出的事件
|
|
@@ -347,6 +362,11 @@ interface ILarkSRConfig {
|
|
|
347
362
|
* 'touchScreen' | 'mouse'
|
|
348
363
|
*/
|
|
349
364
|
touchOperateMode?: 'touchScreen' | 'mouse';
|
|
365
|
+
/**
|
|
366
|
+
* 优先使用渲染服务器点对点连接外网ip
|
|
367
|
+
* 如果配置将覆盖后台设置的 preferPublicIp 参数
|
|
368
|
+
*/
|
|
369
|
+
preferPublicIp?: string;
|
|
350
370
|
}
|
|
351
371
|
declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
|
|
352
372
|
/**
|
|
@@ -903,6 +923,41 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
|
|
|
903
923
|
addMediaTrack(track: MediaStreamTrack, ...streams: MediaStream[]): boolean | undefined;
|
|
904
924
|
removeMediaTrack(track: RTCRtpSender): boolean | undefined;
|
|
905
925
|
requestUserMediaPermission(constraints?: MediaStreamConstraints): Promise<MediaStream> | undefined;
|
|
926
|
+
/**
|
|
927
|
+
* 启动云端推流功能
|
|
928
|
+
* @param params {
|
|
929
|
+
* // rtmp push url 必须填
|
|
930
|
+
* path: "",
|
|
931
|
+
* //rtmp push key
|
|
932
|
+
* key: "",
|
|
933
|
+
* // 推流的宽
|
|
934
|
+
* width: 1280,
|
|
935
|
+
* // 推流的高
|
|
936
|
+
* height: 720,
|
|
937
|
+
* framerate: 30,
|
|
938
|
+
* // kbps
|
|
939
|
+
* bitrate: 1024 * 2,
|
|
940
|
+
* // 是否支持断线重连
|
|
941
|
+
* reconnect: true,
|
|
942
|
+
* //最大重连次数
|
|
943
|
+
* reconnectRetries: 3,
|
|
944
|
+
* //是否串流麦克风(语音输入支持的情况)
|
|
945
|
+
* voice: audioInput,
|
|
946
|
+
* }
|
|
947
|
+
* @returns Promise
|
|
948
|
+
*/
|
|
949
|
+
StartCloudLiveStreaming(params: CloudLark.IRtmp_Start): Promise<void> | undefined;
|
|
950
|
+
/**
|
|
951
|
+
* 关闭云端推流功能
|
|
952
|
+
* @returns
|
|
953
|
+
*/
|
|
954
|
+
StopLiveStreaming(): void | undefined;
|
|
955
|
+
/**
|
|
956
|
+
* 获取当前服务器应用手柄配置
|
|
957
|
+
* @param appliId 应用id,传空为当前应用
|
|
958
|
+
* @returns
|
|
959
|
+
*/
|
|
960
|
+
getTouchCtrMapping(appliId?: string): Promise<unknown>;
|
|
906
961
|
$emit(type: LarkEventType, data?: any, message?: string): void;
|
|
907
962
|
$emitError(message?: string, code?: number): void;
|
|
908
963
|
$emitInfo(message?: string, code?: number): void;
|