larksr_websdk 3.2.401 → 3.2.403

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.
Files changed (63) hide show
  1. package/dist/doc/en/config.md +228 -0
  2. package/dist/doc/en/dev.md +84 -0
  3. package/dist/doc/en/event_codes.md +286 -0
  4. package/dist/doc/en/events.md +229 -0
  5. package/dist/doc/en/functions.md +603 -0
  6. package/dist/doc/en/index.md +115 -0
  7. package/dist/doc/en/member_variables.md +407 -0
  8. package/dist/doc/en/multi_media_3_2_401.md +84 -0
  9. package/dist/doc/en/sdkid_encryption.md +40 -0
  10. package/dist/doc/en/update.md +462 -0
  11. package/dist/doc/zh_CN/config.md +243 -0
  12. package/dist/doc/zh_CN/event_codes.md +286 -0
  13. package/dist/doc/zh_CN/events.md +229 -0
  14. package/dist/doc/zh_CN/functions.md +658 -0
  15. package/dist/doc/zh_CN/index.md +84 -0
  16. package/dist/doc/zh_CN/member_variables.md +431 -0
  17. package/dist/doc/zh_CN/multi_media_3_2_401.md +84 -0
  18. package/dist/doc/zh_CN/sdkid_encryption.md +40 -0
  19. package/dist/doc/zh_CN/update.md +579 -0
  20. package/dist/larksr-web-sdk.min.js +1 -1
  21. package/dist/types/api.d.ts +5 -3
  22. package/dist/types/appli_params.d.ts +13 -8
  23. package/dist/types/config.d.ts +0 -1
  24. package/dist/types/lark/Worker.d.ts +3 -0
  25. package/dist/types/lark/application.d.ts +29 -2
  26. package/dist/types/lark/custom.d.ts +6 -6
  27. package/dist/types/lark/peer_connection.d.ts +7 -2
  28. package/dist/types/lark/peer_connection_media_share.d.ts +1 -1
  29. package/dist/types/lark/webcodec.d.ts +40 -0
  30. package/dist/types/lark/webcodecs.generated.d.ts +417 -0
  31. package/dist/types/lark/websocket_channel.d.ts +1 -0
  32. package/dist/types/lark/websocket_proxy.d.ts +2 -0
  33. package/dist/types/larksr.d.ts +85 -12
  34. package/dist/types/localization/language.d.ts +2 -1
  35. package/dist/types/operation/operation.d.ts +5 -0
  36. package/dist/types/protobuf/cloudlark.d.ts +1198 -102
  37. package/dist/types/screen_state.d.ts +12 -4
  38. package/dist/types/utils/lock_pointer.d.ts +2 -1
  39. package/dist/types/utils/scale_mode.d.ts +19 -0
  40. package/dist/types/utils/unit.d.ts +6 -0
  41. package/dist/types/utils/webgl_utils.d.ts +48 -0
  42. package/package.json +3 -2
  43. package/types/api.d.ts +5 -3
  44. package/types/appli_params.d.ts +13 -8
  45. package/types/config.d.ts +0 -1
  46. package/types/lark/Worker.d.ts +3 -0
  47. package/types/lark/application.d.ts +29 -2
  48. package/types/lark/custom.d.ts +6 -6
  49. package/types/lark/peer_connection.d.ts +7 -2
  50. package/types/lark/peer_connection_media_share.d.ts +1 -1
  51. package/types/lark/webcodec.d.ts +40 -0
  52. package/types/lark/webcodecs.generated.d.ts +417 -0
  53. package/types/lark/websocket_channel.d.ts +1 -0
  54. package/types/lark/websocket_proxy.d.ts +2 -0
  55. package/types/larksr.d.ts +85 -12
  56. package/types/localization/language.d.ts +2 -1
  57. package/types/operation/operation.d.ts +5 -0
  58. package/types/protobuf/cloudlark.d.ts +1198 -102
  59. package/types/screen_state.d.ts +12 -4
  60. package/types/utils/lock_pointer.d.ts +2 -1
  61. package/types/utils/scale_mode.d.ts +19 -0
  62. package/types/utils/unit.d.ts +6 -0
  63. package/types/utils/webgl_utils.d.ts +48 -0
@@ -72,11 +72,12 @@ export interface StartAppInfo {
72
72
  rttLimitInterval: string;
73
73
  playerMode?: number;
74
74
  userType?: number;
75
- roomCode?: string;
75
+ authCode?: string;
76
76
  nickName?: string;
77
77
  nickname?: string;
78
78
  appKey?: string;
79
79
  groupId?: string;
80
+ initResolutionType?: number;
80
81
  }
81
82
  declare type HostAppliGetUrlReturnParams = {
82
83
  appliId: string;
@@ -100,7 +101,7 @@ export default class API {
100
101
  appliId: string;
101
102
  playerMode?: number;
102
103
  userType?: number;
103
- roomCode?: string;
104
+ authCode?: string;
104
105
  taskId?: string;
105
106
  }): Promise<{
106
107
  host: string;
@@ -112,7 +113,7 @@ export default class API {
112
113
  appliId: string;
113
114
  playerMode?: number;
114
115
  userType?: number;
115
- roomCode?: string;
116
+ authCode?: string;
116
117
  taskId?: string;
117
118
  clientMac?: string;
118
119
  groupId?: string;
@@ -131,6 +132,7 @@ export default class API {
131
132
  static GetTouchCtrMapping(server: string, appliId?: string): Promise<unknown>;
132
133
  static GetAppliList(server: string, params: any): Promise<unknown>;
133
134
  static RegionList(server: string, params: any): Promise<unknown>;
135
+ static heartbeat(server: string, taskId: string): Promise<unknown>;
134
136
  static joinParam(params: any): string;
135
137
  }
136
138
  export {};
@@ -98,10 +98,11 @@ export interface IAppliParams {
98
98
  language: string;
99
99
  /**
100
100
  * 初始的鼠标锁定模式
101
- * false:非锁定模式
102
- * true:锁定模式
101
+ * 0:自动判断模式
102
+ * 1:锁定模式
103
+ * 2: 非锁定模式
103
104
  */
104
- initCursorMode: boolean;
105
+ initCursorMode: number;
105
106
  /**
106
107
  * 背景颜色
107
108
  */
@@ -137,7 +138,7 @@ export interface IAppliParams {
137
138
  /**
138
139
  * 口令:8位唯一码,写入TaskInfo. 房间code,备用。
139
140
  */
140
- roomCode: string;
141
+ authCode: string;
141
142
  /**
142
143
  * debug task. 跳过task检测
143
144
  */
@@ -181,7 +182,7 @@ export interface IAppliParams {
181
182
  /**
182
183
  * 触摸操作对应的操作方式,触摸屏还是鼠标
183
184
  */
184
- touchOperateMode: 'touchScreen' | 'mouse';
185
+ touchOperateMode: 'touchScreen' | 'mouse' | 'mix';
185
186
  /**
186
187
  * appid
187
188
  */
@@ -203,6 +204,8 @@ export interface IAppliParams {
203
204
  liveStreaming: boolean;
204
205
  useSeparateMediaSharePeer: boolean;
205
206
  mobileKeyboardType: number;
207
+ initResolutionType: number;
208
+ useWebcodec: boolean;
206
209
  }
207
210
  export declare enum AppliType {
208
211
  DESKTOP = 1,
@@ -239,14 +242,14 @@ export declare class AppliParams implements IAppliParams {
239
242
  frameRate: number;
240
243
  network: 'local' | 'public';
241
244
  language: string;
242
- initCursorMode: boolean;
245
+ initCursorMode: number;
243
246
  bgColor: string;
244
247
  fullScreenMode: number;
245
248
  mobileFullScreenMode: number;
246
249
  playerMode: number;
247
250
  userType: number;
248
251
  nickname: string;
249
- roomCode: string;
252
+ authCode: string;
250
253
  debugTask: boolean;
251
254
  debugWebServer: string;
252
255
  loadingTimeout: number;
@@ -256,7 +259,7 @@ export declare class AppliParams implements IAppliParams {
256
259
  mouseZoomDirection: number;
257
260
  showPlayerList: boolean;
258
261
  preferDecoder: 'auto' | 'vp8' | 'vp9' | 'h264' | 'h265' | 'hevc' | 'av1' | 'av1x';
259
- touchOperateMode: 'touchScreen' | 'mouse';
262
+ touchOperateMode: 'touchScreen' | 'mouse' | 'mix';
260
263
  appliId: string;
261
264
  syncLocalToCloudClipboard: boolean;
262
265
  enableRttIcon: boolean;
@@ -272,6 +275,8 @@ export declare class AppliParams implements IAppliParams {
272
275
  liveStreaming: boolean;
273
276
  useSeparateMediaSharePeer: boolean;
274
277
  mobileKeyboardType: number;
278
+ initResolutionType: number;
279
+ useWebcodec: boolean;
275
280
  static copyAndCreate(params?: IAppliParams): AppliParams;
276
281
  static setUpWithSDKConfig(params: IAppliParams, config: ILarkSRConfig): AppliParams;
277
282
  }
@@ -55,5 +55,4 @@ export default class Config {
55
55
  */
56
56
  static VirtualRackerScale: number;
57
57
  static ErrChromeAndroidVersion: string[];
58
- static DownloadChromium: string;
59
58
  }
@@ -0,0 +1,3 @@
1
+ declare const ctx: Worker;
2
+ declare var fading: boolean;
3
+ declare var interval: any;
@@ -6,6 +6,7 @@ import { LarkSR } from '../larksr';
6
6
  import PixelStreamingWebsocketChannel from './test_pixel_streaming';
7
7
  import { RECORDER_STATE } from './recoder';
8
8
  import PeerConnectionMediaShare from './peer_connection_media_share';
9
+ import WebCodec from './webcodec';
9
10
  export declare enum APP_STATE {
10
11
  BEFORE_CREATE = 0,
11
12
  INITED = 1,
@@ -46,7 +47,9 @@ export declare enum APP_EVENT_TYPE {
46
47
  AI_VOICE_ERROR = 21,
47
48
  RTMP_STREAM_STATE = 22,
48
49
  RTMP_STREAM_ERROR = 23,
49
- RTC_RETRY_SUCCESS = 24
50
+ RTC_RETRY_SUCCESS = 24,
51
+ AerialViewStatus = 25,
52
+ AerialViewScreen = 26
50
53
  }
51
54
  export interface AppEvent extends LocalEvent<APP_EVENT_TYPE> {
52
55
  data?: any;
@@ -79,6 +82,9 @@ export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
79
82
  get recodeState(): RECORDER_STATE;
80
83
  private recoder;
81
84
  private rtcConfig;
85
+ get currentAppSize(): Msg.CloudLark.IAppResize | null | undefined;
86
+ get webcodecDecoder(): WebCodec;
87
+ private _webcodecDecoder;
82
88
  constructor(larksr: LarkSR);
83
89
  init(): void;
84
90
  initSharePc(): void;
@@ -91,18 +97,36 @@ export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
91
97
  inputText(text: string): void;
92
98
  sendTextToDataChannel(text: string): void;
93
99
  sendBinaryToDataChannel(binary: Uint8Array): void;
100
+ sendReStartApplication(): void;
101
+ sendApplicationSize(width: number, height: number): void;
102
+ startAerialview(viewbox: {
103
+ x: number;
104
+ y: number;
105
+ width: number;
106
+ height: number;
107
+ }, interval: number | undefined, thumbnailWidth: 120, thumbnailHeight: 120): void;
108
+ updateAerialview(viewbox: {
109
+ x: number;
110
+ y: number;
111
+ width: number;
112
+ height: number;
113
+ }): void;
114
+ stopAerialview(): void;
115
+ sendShowDebugLayout(open: boolean): void;
94
116
  sendVideoBitrateKbps(bitrateKbps: number): void;
117
+ sendVideoFps(fps: number): void;
95
118
  aiDmTextInput(text: string): number;
96
119
  startAiDmVoiceInput(): Promise<number>;
97
120
  stopAiDmVoiceInput(): number;
98
121
  private onRecoderData;
99
122
  start(): Promise<void>;
100
123
  connect(): Promise<PixelStreamingWebsocketChannel> | Promise<WebsocketProxy> | Promise<WebSocektChannel> | undefined;
124
+ sendKeepAlive(): void | undefined;
101
125
  disConnect(): void;
102
126
  closeRtc(): void;
103
127
  versionCheck(): void;
104
128
  task(): void;
105
- startSteam(): void;
129
+ startSteam(): Promise<void>;
106
130
  startMonitorSteam(): void;
107
131
  restart(): void;
108
132
  restartApp(): void;
@@ -135,6 +159,9 @@ export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
135
159
  private onRtmpStreamingError;
136
160
  private onIceStateChange;
137
161
  retryPeerconnection(): void;
162
+ private onAerialViewStatus;
163
+ private onAerialViewScreen;
164
+ private onVideoFrame;
138
165
  private onShareMediaError;
139
166
  private onShareMediaInfo;
140
167
  private onShareMediaOffer;
@@ -1,7 +1,7 @@
1
- // declare module "worker-loader!*" {
2
- // class WebpackWorker extends Worker {
3
- // constructor();
4
- // }
1
+ declare module "worker-loader!*" {
2
+ class WebpackWorker extends Worker {
3
+ constructor();
4
+ }
5
5
 
6
- // export = WebpackWorker;
7
- // }
6
+ export = WebpackWorker;
7
+ }
@@ -34,7 +34,10 @@ export declare enum WEBRTC_EVENT_TYPE {
34
34
  AI_VOICE_ERROR = 21,
35
35
  RTMP_STREAM_STATE = 22,
36
36
  RTMP_STREAM_ERROR = 23,
37
- INFO = 24
37
+ INFO = 24,
38
+ AerialViewStatus = 25,
39
+ AerialViewScreen = 26,
40
+ VideoFrame = 27
38
41
  }
39
42
  export interface GoogleBitRate {
40
43
  start: number;
@@ -114,6 +117,8 @@ export default class PeerConnection extends EventBase<WEBRTC_EVENT_TYPE, WebRTCE
114
117
  private _serverFeatures;
115
118
  get serverStatics(): CloudLark.IServerStatics | null;
116
119
  private _serverStatics;
120
+ get currentAppSize(): CloudLark.IAppResize | null;
121
+ private _currentAppSize;
117
122
  constructor(larksr: LarkSR, config: WebRTCConfig);
118
123
  create(streams?: MediaStream | undefined | null, config?: CloudLark.IRTCConfiguration | null | undefined): Promise<void>;
119
124
  createOffer(): void;
@@ -164,7 +169,7 @@ export default class PeerConnection extends EventBase<WEBRTC_EVENT_TYPE, WebRTCE
164
169
  private resumeOrCreateBinding;
165
170
  addMediaTrack(track: MediaStreamTrack, ...streams: MediaStream[]): boolean;
166
171
  removeMediaTrack(track: RTCRtpSender): boolean;
167
- requestUserMediaPermission(constraints?: MediaStreamConstraints): Promise<MediaStream>;
172
+ requestUserMediaPermission(constraints?: MediaStreamConstraints): Promise<unknown>;
168
173
  /**
169
174
  * 接收到sdp
170
175
  * @param des sdp
@@ -139,7 +139,7 @@ export default class PeerConnectionMediaShare extends EventBase<WEBRTC_MEDIA_SHA
139
139
  private resumeOrCreateBinding;
140
140
  addMediaTrack(track: MediaStreamTrack, ...streams: MediaStream[]): boolean;
141
141
  removeMediaTrack(track: RTCRtpSender): boolean;
142
- requestUserMediaPermission(constraints?: MediaStreamConstraints): Promise<MediaStream>;
142
+ requestUserMediaPermission(constraints?: MediaStreamConstraints): Promise<unknown>;
143
143
  /**
144
144
  * 接收到sdp
145
145
  * @param des sdp
@@ -0,0 +1,40 @@
1
+ import { LocalEvent } from "@/event/event_base";
2
+ import { EventBase, LarkSR } from "@/larksr";
3
+ import { CloudLark } from '@/protobuf/cloudlark';
4
+ export declare enum WebCodecType {
5
+ WebCodecTypeH264 = "h264",
6
+ WebCodecTypeH265 = "h265",
7
+ WebCodecTypeNone = "none"
8
+ }
9
+ export declare enum WEB_CODEC_EVENT_TYPE {
10
+ PLAYED = 0
11
+ }
12
+ export interface WebCodecEvent extends LocalEvent<WEB_CODEC_EVENT_TYPE> {
13
+ data?: any;
14
+ }
15
+ export default class WebCodec extends EventBase<WEB_CODEC_EVENT_TYPE, WebCodecEvent> {
16
+ static AVC_High_PROFILE: string;
17
+ static HEVC_MAIN_PROFILE: string;
18
+ static checkSupport(codec: WebCodecType, width?: number, height?: number): Promise<boolean>;
19
+ static toWebCodecType(cloudType: CloudLark.StreamVideoFrame.Codec | null | undefined): WebCodecType;
20
+ static getProfileName(codec: WebCodecType): string;
21
+ private larksr;
22
+ private decoder;
23
+ private codec;
24
+ private width;
25
+ private height;
26
+ private canvas;
27
+ private context;
28
+ private frameData;
29
+ private dataOffset;
30
+ private firstFrame;
31
+ constructor(larksr: LarkSR);
32
+ setCanvas(canvas: HTMLCanvasElement, context: CanvasRenderingContext2D): void;
33
+ init(frame: CloudLark.IStreamVideoFrame): Promise<boolean | undefined>;
34
+ onStreamVideoFrame(frame: CloudLark.IStreamVideoFrame): Promise<void>;
35
+ private checkConfig;
36
+ private onFrameDecode;
37
+ private onFrameError;
38
+ private $emit;
39
+ private createAppEvent;
40
+ }