larksr_websdk 3.2.401 → 3.2.402

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.
@@ -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;
@@ -137,7 +137,7 @@ export interface IAppliParams {
137
137
  /**
138
138
  * 口令:8位唯一码,写入TaskInfo. 房间code,备用。
139
139
  */
140
- roomCode: string;
140
+ authCode: string;
141
141
  /**
142
142
  * debug task. 跳过task检测
143
143
  */
@@ -203,6 +203,7 @@ export interface IAppliParams {
203
203
  liveStreaming: boolean;
204
204
  useSeparateMediaSharePeer: boolean;
205
205
  mobileKeyboardType: number;
206
+ initResolutionType: number;
206
207
  }
207
208
  export declare enum AppliType {
208
209
  DESKTOP = 1,
@@ -246,7 +247,7 @@ export declare class AppliParams implements IAppliParams {
246
247
  playerMode: number;
247
248
  userType: number;
248
249
  nickname: string;
249
- roomCode: string;
250
+ authCode: string;
250
251
  debugTask: boolean;
251
252
  debugWebServer: string;
252
253
  loadingTimeout: number;
@@ -272,6 +273,7 @@ export declare class AppliParams implements IAppliParams {
272
273
  liveStreaming: boolean;
273
274
  useSeparateMediaSharePeer: boolean;
274
275
  mobileKeyboardType: number;
276
+ initResolutionType: number;
275
277
  static copyAndCreate(params?: IAppliParams): AppliParams;
276
278
  static setUpWithSDKConfig(params: IAppliParams, config: ILarkSRConfig): AppliParams;
277
279
  }
@@ -46,7 +46,9 @@ export declare enum APP_EVENT_TYPE {
46
46
  AI_VOICE_ERROR = 21,
47
47
  RTMP_STREAM_STATE = 22,
48
48
  RTMP_STREAM_ERROR = 23,
49
- RTC_RETRY_SUCCESS = 24
49
+ RTC_RETRY_SUCCESS = 24,
50
+ AerialViewStatus = 25,
51
+ AerialViewScreen = 26
50
52
  }
51
53
  export interface AppEvent extends LocalEvent<APP_EVENT_TYPE> {
52
54
  data?: any;
@@ -79,6 +81,7 @@ export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
79
81
  get recodeState(): RECORDER_STATE;
80
82
  private recoder;
81
83
  private rtcConfig;
84
+ get currentAppSize(): Msg.CloudLark.IAppResize | null | undefined;
82
85
  constructor(larksr: LarkSR);
83
86
  init(): void;
84
87
  initSharePc(): void;
@@ -91,7 +94,24 @@ export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
91
94
  inputText(text: string): void;
92
95
  sendTextToDataChannel(text: string): void;
93
96
  sendBinaryToDataChannel(binary: Uint8Array): void;
97
+ sendReStartApplication(): void;
98
+ sendApplicationSize(width: number, height: number): void;
99
+ startAerialview(viewbox: {
100
+ x: number;
101
+ y: number;
102
+ width: number;
103
+ height: number;
104
+ }, interval: number | undefined, thumbnailWidth: 120, thumbnailHeight: 120): void;
105
+ updateAerialview(viewbox: {
106
+ x: number;
107
+ y: number;
108
+ width: number;
109
+ height: number;
110
+ }): void;
111
+ stopAerialview(): void;
112
+ sendShowDebugLayout(open: boolean): void;
94
113
  sendVideoBitrateKbps(bitrateKbps: number): void;
114
+ sendVideoFps(fps: number): void;
95
115
  aiDmTextInput(text: string): number;
96
116
  startAiDmVoiceInput(): Promise<number>;
97
117
  stopAiDmVoiceInput(): number;
@@ -135,6 +155,8 @@ export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
135
155
  private onRtmpStreamingError;
136
156
  private onIceStateChange;
137
157
  retryPeerconnection(): void;
158
+ private onAerialViewStatus;
159
+ private onAerialViewScreen;
138
160
  private onShareMediaError;
139
161
  private onShareMediaInfo;
140
162
  private onShareMediaOffer;
@@ -34,7 +34,9 @@ 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
38
40
  }
39
41
  export interface GoogleBitRate {
40
42
  start: number;
@@ -114,6 +116,8 @@ export default class PeerConnection extends EventBase<WEBRTC_EVENT_TYPE, WebRTCE
114
116
  private _serverFeatures;
115
117
  get serverStatics(): CloudLark.IServerStatics | null;
116
118
  private _serverStatics;
119
+ get currentAppSize(): CloudLark.IAppResize | null;
120
+ private _currentAppSize;
117
121
  constructor(larksr: LarkSR, config: WebRTCConfig);
118
122
  create(streams?: MediaStream | undefined | null, config?: CloudLark.IRTCConfiguration | null | undefined): Promise<void>;
119
123
  createOffer(): void;
@@ -164,7 +168,7 @@ export default class PeerConnection extends EventBase<WEBRTC_EVENT_TYPE, WebRTCE
164
168
  private resumeOrCreateBinding;
165
169
  addMediaTrack(track: MediaStreamTrack, ...streams: MediaStream[]): boolean;
166
170
  removeMediaTrack(track: RTCRtpSender): boolean;
167
- requestUserMediaPermission(constraints?: MediaStreamConstraints): Promise<MediaStream>;
171
+ requestUserMediaPermission(constraints?: MediaStreamConstraints): Promise<unknown>;
168
172
  /**
169
173
  * 接收到sdp
170
174
  * @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
@@ -241,7 +241,12 @@ declare enum LarkSRClientEvent {
241
241
  * 服务端 3.2.7.0 添加
242
242
  * rtmp 直播推流出错
243
243
  */
244
- RTMP_STREAM_ERROR = "rtmpstreamerror"
244
+ RTMP_STREAM_ERROR = "rtmpstreamerror",
245
+ /**
246
+ * 服务端 3.2.2.x 添加
247
+ * 鸟瞰模式背景缩略图
248
+ */
249
+ AERIAL_VIEW_SCREEN = "aerialviewscreen"
245
250
  }
246
251
  /**
247
252
  * LarkSR 发出的事件
@@ -457,8 +462,8 @@ interface ILarkSRConfig {
457
462
  showPlayButton?: boolean;
458
463
  /**
459
464
  * 可选项
460
- * 语言设置,目前只支持种英文两种,默认中文
461
- * zh-CN 中文 en 英文
465
+ * 语言设置,目前支持中文简体、中文繁体、英文三种,默认中文简体
466
+ * zh-CN 中文简体 zh-TW 中文繁体 en 英文
462
467
  */
463
468
  language?: string;
464
469
  /**
@@ -475,11 +480,21 @@ interface ILarkSRConfig {
475
480
  * 是否启用 canvas 渲染. 默认关闭
476
481
  */
477
482
  enableCanvasRender?: boolean;
483
+ /**
484
+ * 强制使用canvs2d模式,默认优先使用 webgl
485
+ */
486
+ forceCanvas2d?: boolean;
478
487
  /**
479
488
  * 可选项
480
489
  * loading页载入Logo版本
481
490
  */
482
491
  loadingLogoVersion?: string;
492
+ /**
493
+ * 初始化分辨率方式
494
+ * 1:适应客户端窗口】和【0:应用默认分辨率】,默认值:0
495
+ * 此处配置优先级大于管理后台配置
496
+ */
497
+ initResolutionType?: number;
483
498
  }
484
499
  declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
485
500
  /**
@@ -517,6 +532,7 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
517
532
  get remoteScreenReady(): boolean;
518
533
  set remoteScreenReady(ready: boolean);
519
534
  private _remoteScreenReady;
535
+ onFirstAppsize(width: number, height: number): void;
520
536
  /**
521
537
  * 当前的屏幕状态
522
538
  * @see ScreenState
@@ -673,6 +689,50 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
673
689
  * @param bitrateKbps
674
690
  */
675
691
  setVideoBitrateKbps(bitrateKbps: number): void;
692
+ /**
693
+ * 动态设置帧率
694
+ */
695
+ setVideoFps(fps: number): void;
696
+ /**
697
+ * 动态设置云端 debug 窗口
698
+ */
699
+ setCloudDebugLayout(open: boolean): void;
700
+ /**
701
+ * 重启云端应用
702
+ */
703
+ restartCloudApp(): void;
704
+ /**
705
+ * 设置云端应用大小
706
+ */
707
+ setCloudAppSize(width: number, height: number): void;
708
+ /**
709
+ * 当前云端应用窗口大小
710
+ */
711
+ get currentAppSize(): CloudLark.IAppResize | null | undefined;
712
+ /**
713
+ * 开始鸟瞰模式
714
+ */
715
+ startAerialview(viewbox: {
716
+ x: number;
717
+ y: number;
718
+ width: number;
719
+ height: number;
720
+ }, interval: number | undefined, thumbnailWidth: 120, thumbnailHeight: 120): void;
721
+ /**
722
+ * 更新鸟瞰模式区域
723
+ */
724
+ updateAerialview(viewbox: {
725
+ x: number;
726
+ y: number;
727
+ width: number;
728
+ height: number;
729
+ }): void;
730
+ /**
731
+ * 停止鸟瞰模式区域
732
+ */
733
+ stopAerialview(): void;
734
+ get syncClientViewport(): boolean;
735
+ set syncClientViewport(sync: boolean);
676
736
  /**
677
737
  * LarkSR 客户端。所有操作和事件通过该类传递
678
738
  * @param config 本地配置,优先级最高
@@ -700,7 +760,7 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
700
760
  appliId: string;
701
761
  playerMode?: number;
702
762
  userType?: number;
703
- roomCode?: string;
763
+ authCode?: string;
704
764
  taskId?: string;
705
765
  regionId?: string;
706
766
  groupId?: string;
@@ -738,7 +798,7 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
738
798
  appliId: string;
739
799
  playerMode?: number;
740
800
  userType?: number;
741
- roomCode?: string;
801
+ authCode?: string;
742
802
  taskId?: string;
743
803
  clientMac?: string;
744
804
  groupId?: string;
@@ -1249,5 +1309,6 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
1249
1309
  private onDataChannelClose;
1250
1310
  private onOperationTimeout;
1251
1311
  private onOperationInput;
1312
+ private setCanvasMode;
1252
1313
  }
1253
1314
  export { LarkSR, ILarkSRConfig, PlayerModeType, UserType, LarkSREvent, LarkEventType, LarkSRClientEvent, AppliParams, AppliParamsUtils, LoadAppliParamsFromUrl, LoadAppliParamsStartAppInfo, EventBase, API, Operation, Capabilities, ScaleMode, VirtualKey, KEYMAP, CloudLark, FullScreen, LockPointer, Recorder, GESTURE_TYPE, };
@@ -1,6 +1,7 @@
1
1
  export declare enum SupportLanguage {
2
2
  CN = 0,
3
- EN = 1
3
+ EN = 1,
4
+ TW = 2
4
5
  }
5
6
  export declare function isChinese(codeString: string): boolean;
6
7
  export declare function getSupportLanguageFromCodeStr(codeString: string): SupportLanguage;
@@ -61,6 +61,11 @@ export default class Operation extends EventBase<OPREATION_EVENT_TYPE, Operation
61
61
  get lockPointer(): import("../larksr").LockPointer;
62
62
  get mouseZoomDirection(): number;
63
63
  set mouseZoomDirection(direction: number);
64
+ set aerialviewStatus(status: CloudLark.IAerialViewStatus | null);
65
+ get aerialviewStatus(): CloudLark.IAerialViewStatus | null;
66
+ _aerialviewStatus: CloudLark.IAerialViewStatus | null;
67
+ get aerialViewEnable(): boolean;
68
+ get aerialViewBox(): CloudLark.IAerialViewBox;
64
69
  constructor(rootElement: HTMLElement, larksr: LarkSR);
65
70
  setMouseEnable(enable: boolean): void;
66
71
  setKeyboardEnable(enable: boolean): void;
@@ -42,7 +42,8 @@ export interface SyncCursorStyle {
42
42
  customBase64: string;
43
43
  }
44
44
  export declare const enum SCREEN_EVENT_TYPE {
45
- ReSize = 0
45
+ ReSize = 0,
46
+ ContainerResize = 1
46
47
  }
47
48
  export interface ScreenEvent extends LocalEvent<SCREEN_EVENT_TYPE> {
48
49
  container: ContainerSize;
@@ -52,9 +53,16 @@ export default class ScreenState extends EventBase<SCREEN_EVENT_TYPE, ScreenEven
52
53
  get appSize(): CloudLark.IAppResize;
53
54
  set appSize(size: CloudLark.IAppResize);
54
55
  private _appSize;
56
+ set originAppSize(viewport: ViewPort);
57
+ get originAppSize(): ViewPort;
58
+ private _originAppSize;
55
59
  get viewPort(): ViewPort;
56
60
  private _viewPort;
57
61
  get viewPortStyle(): string;
62
+ get syncClientViewport(): {
63
+ width: number;
64
+ height: number;
65
+ };
58
66
  get orientationIndexStyle(): {
59
67
  width: string;
60
68
  height: string;
@@ -116,5 +124,5 @@ export default class ScreenState extends EventBase<SCREEN_EVENT_TYPE, ScreenEven
116
124
  constructor(rootElement: HTMLElement, params: IAppliParams, larksr: LarkSR, handleRootElementSize?: boolean, onlyHandleRootElementTransform?: boolean);
117
125
  reset(params: IAppliParams): void;
118
126
  setMobileForceLandScape(force: boolean): void;
119
- resize(baseElementScale?: number): void;
127
+ resize(baseElementScale?: number, containerResize?: boolean): void;
120
128
  }
@@ -145,4 +145,10 @@ export default class Unit {
145
145
  * @returns
146
146
  */
147
147
  static evenNumber(n: number): number;
148
+ /**
149
+ * 向下为整数并且 向下计算为偶数
150
+ * @param n
151
+ * @returns
152
+ */
153
+ static floorevenNumber(n: number): number;
148
154
  }
@@ -0,0 +1,48 @@
1
+ export interface WebGLBufferInfo {
2
+ position: WebGLBuffer | null;
3
+ textureCoord: WebGLBuffer | null;
4
+ indices: WebGLBuffer | null;
5
+ }
6
+ export default class WebGlUtils {
7
+ static fullScreenVertices: number[];
8
+ static fullscreenTextureCoords: number[];
9
+ static fullscreenIndices: number[];
10
+ static fullscreenVsSource: string;
11
+ static fullscreenFsSource: string;
12
+ static initfullScreenBuffers(gl: WebGLRenderingContext): WebGLBufferInfo;
13
+ static initTexture(gl: WebGLRenderingContext, source?: TexImageSource | null, width?: number, height?: number, internalFormat?: number): WebGLTexture | null;
14
+ static updateTexture(gl: WebGLRenderingContext, texture: WebGLTexture, video: TexImageSource): void;
15
+ static initShaderProgram(gl: WebGLRenderingContext, vsSource: string, fsSource: string): WebGLProgram;
16
+ static loadShader(gl: WebGLRenderingContext, type: number, source: string): WebGLShader;
17
+ static setPositionAttribute(gl: WebGLRenderingContext, positionBuffer: WebGLBuffer, vertexPositionAttr: number, numComponents?: number, stride?: number, offset?: number): void;
18
+ static setTextureAttribute(gl: WebGLRenderingContext, textureCoordBuffers: WebGLBuffer, textureCoordAttr: number, numComponents?: number, stride?: number, offset?: number): void;
19
+ }
20
+ export declare class FullScreenGlRender {
21
+ get inited(): boolean;
22
+ private _inited;
23
+ get canvas(): HTMLCanvasElement | null;
24
+ private _canvas;
25
+ get video(): HTMLVideoElement | null;
26
+ private _video;
27
+ get gl(): WebGLRenderingContext | null;
28
+ private _gl;
29
+ get shaderProgram(): WebGLProgram | null;
30
+ private _shaderProgram;
31
+ vertexPosition: number;
32
+ textureCoord: number;
33
+ uSampler: WebGLUniformLocation | null;
34
+ buffers: WebGLBufferInfo | null;
35
+ texture: WebGLTexture | null;
36
+ drawFrames: number;
37
+ playing: boolean;
38
+ timeupdate: boolean;
39
+ copyVideo: boolean;
40
+ startInternal: boolean;
41
+ constructor();
42
+ init(canvas: HTMLCanvasElement, video: HTMLVideoElement): boolean;
43
+ private checkReady;
44
+ startCanvasRender(): void;
45
+ stopCanvasRender(): void;
46
+ draw(viewportX?: number, viewportY?: number, viewportWidth?: number, viewPortHeight?: number): void;
47
+ updateVideo(video: HTMLVideoElement): void;
48
+ }
package/package.json CHANGED
@@ -1,71 +1,71 @@
1
- {
2
- "name": "larksr_websdk",
3
- "version": "3.2.401",
4
- "description": "Larksr websdk. Easy to build a cloud render client for larksr system or ue4 pixelstreaming.docs: https://pingxingyun.github.io/webclient_sdk/",
5
- "keywords": [
6
- "pingxingyun",
7
- "larksr",
8
- "cloudrendeing",
9
- "webrtc",
10
- "cloudxr",
11
- "pixelstreaming"
12
- ],
13
- "main": "./dist/larksr-web-sdk.min.js",
14
- "types": "./types/index.d.ts",
15
- "files": [
16
- "dist",
17
- "types",
18
- "doc,"
19
- ],
20
- "scripts": {
21
- "test": "echo \"Error: no test specified\" && exit 1",
22
- "dev": "webpack-dev-server --config webpack.config.dev.js",
23
- "build": "webpack --config webpack.config.js",
24
- "build:typings": "tsc --build tsconfig.type.json",
25
- "copy-dts": "copyfiles -u 1 \"src/**/*.d.ts\" dist/types/",
26
- "dist": "webpack --config webpack.config.js && copyfiles -u 1 \"src/**/*.d.ts\" ./types/ && copyfiles -u 1 \"doc/*\" dist/doc/ && copyfiles -u 1 \"types/**/*.d.ts\" ./dist/types/ && copyfiles -u 1 \"dist/*\" ./sample-plain-html/source/dist/"
27
- },
28
- "author": "fcx@pingxingyun.com",
29
- "license": "ISC",
30
- "dependencies": {
31
- "axios": "^0.24.0",
32
- "bowser": "^2.11.0",
33
- "core-js": "^3.18.1",
34
- "crypto-js": "^4.1.1",
35
- "ios-inner-height": "^1.1.1",
36
- "protobufjs": "^6.11.2",
37
- "webrtc-adapter": "^8.1.0",
38
- "weixin-js-sdk": "^1.6.0"
39
- },
40
- "devDependencies": {
41
- "@babel/core": "^7.15.5",
42
- "@tsconfig/svelte": "^2.0.1",
43
- "@types/crypto-js": "^4.0.2",
44
- "@types/webrtc": "^0.0.30",
45
- "babel-loader": "^8.2.2",
46
- "clean-webpack-plugin": "^4.0.0",
47
- "css-loader": "^6.3.0",
48
- "fork-ts-checker-webpack-plugin": "^6.3.3",
49
- "html-loader": "^3.0.1",
50
- "html-webpack-plugin": "^5.3.2",
51
- "less-loader": "^10.0.1",
52
- "react": "^17.0.2",
53
- "react-dom": "^17.0.2",
54
- "sass": "^1.43.4",
55
- "scss": "^0.2.4",
56
- "style-loader": "^3.3.0",
57
- "svelte": "^3.44.1",
58
- "svelte-check": "^2.2.10",
59
- "svelte-loader": "^3.1.2",
60
- "svelte-preprocess": "^4.9.8",
61
- "terser-webpack-plugin": "^5.2.5",
62
- "ts-loader": "^9.2.6",
63
- "typescript": "^4.4.3",
64
- "typescript-svelte-plugin": "^0.2.5",
65
- "url-loader": "^4.1.1",
66
- "vconsole": "^3.12.1",
67
- "webpack": "^5.54.0",
68
- "webpack-cli": "^4.8.0",
69
- "webpack-dev-server": "^4.3.0"
70
- }
71
- }
1
+ {
2
+ "name": "larksr_websdk",
3
+ "version": "3.2.402",
4
+ "description": "Larksr websdk. Easy to build a cloud render client for larksr system or ue4 pixelstreaming.docs: https://pingxingyun.github.io/webclient_sdk/",
5
+ "keywords": [
6
+ "pingxingyun",
7
+ "larksr",
8
+ "cloudrendeing",
9
+ "webrtc",
10
+ "cloudxr",
11
+ "pixelstreaming"
12
+ ],
13
+ "main": "./dist/larksr-web-sdk.min.js",
14
+ "types": "./types/index.d.ts",
15
+ "files": [
16
+ "dist",
17
+ "types",
18
+ "doc,"
19
+ ],
20
+ "scripts": {
21
+ "test": "echo \"Error: no test specified\" && exit 1",
22
+ "dev": "webpack-dev-server --config webpack.config.dev.js",
23
+ "build": "webpack --config webpack.config.js",
24
+ "build:typings": "tsc --build tsconfig.type.json",
25
+ "copy-dts": "copyfiles -u 1 \"src/**/*.d.ts\" dist/types/",
26
+ "dist": "webpack --config webpack.config.js && copyfiles -u 1 \"src/**/*.d.ts\" ./types/ && copyfiles -u 1 \"doc/**/*\" dist/doc/ && copyfiles -u 1 \"types/**/*.d.ts\" ./dist/types/ && copyfiles -u 1 \"dist/*\" ./sample-plain-html/source/dist/"
27
+ },
28
+ "author": "fcx@pingxingyun.com",
29
+ "license": "ISC",
30
+ "dependencies": {
31
+ "axios": "^0.24.0",
32
+ "bowser": "^2.11.0",
33
+ "core-js": "^3.18.1",
34
+ "crypto-js": "^4.1.1",
35
+ "ios-inner-height": "^1.1.1",
36
+ "protobufjs": "^6.11.2",
37
+ "webrtc-adapter": "^8.1.0",
38
+ "weixin-js-sdk": "^1.6.0"
39
+ },
40
+ "devDependencies": {
41
+ "@babel/core": "^7.15.5",
42
+ "@tsconfig/svelte": "^2.0.1",
43
+ "@types/crypto-js": "^4.0.2",
44
+ "@types/webrtc": "^0.0.30",
45
+ "babel-loader": "^8.2.2",
46
+ "clean-webpack-plugin": "^4.0.0",
47
+ "css-loader": "^6.3.0",
48
+ "fork-ts-checker-webpack-plugin": "^6.3.3",
49
+ "html-loader": "^3.0.1",
50
+ "html-webpack-plugin": "^5.3.2",
51
+ "less-loader": "^10.0.1",
52
+ "react": "^17.0.2",
53
+ "react-dom": "^17.0.2",
54
+ "sass": "^1.43.4",
55
+ "scss": "^0.2.4",
56
+ "style-loader": "^3.3.0",
57
+ "svelte": "^3.44.1",
58
+ "svelte-check": "^2.2.10",
59
+ "svelte-loader": "^3.1.2",
60
+ "svelte-preprocess": "^4.9.8",
61
+ "terser-webpack-plugin": "^5.2.5",
62
+ "ts-loader": "^9.2.6",
63
+ "typescript": "^4.4.3",
64
+ "typescript-svelte-plugin": "^0.2.5",
65
+ "url-loader": "^4.1.1",
66
+ "vconsole": "^3.12.1",
67
+ "webpack": "^5.54.0",
68
+ "webpack-cli": "^4.8.0",
69
+ "webpack-dev-server": "^4.3.0"
70
+ }
71
+ }
package/types/api.d.ts CHANGED
@@ -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;
@@ -137,7 +137,7 @@ export interface IAppliParams {
137
137
  /**
138
138
  * 口令:8位唯一码,写入TaskInfo. 房间code,备用。
139
139
  */
140
- roomCode: string;
140
+ authCode: string;
141
141
  /**
142
142
  * debug task. 跳过task检测
143
143
  */
@@ -203,6 +203,7 @@ export interface IAppliParams {
203
203
  liveStreaming: boolean;
204
204
  useSeparateMediaSharePeer: boolean;
205
205
  mobileKeyboardType: number;
206
+ initResolutionType: number;
206
207
  }
207
208
  export declare enum AppliType {
208
209
  DESKTOP = 1,
@@ -246,7 +247,7 @@ export declare class AppliParams implements IAppliParams {
246
247
  playerMode: number;
247
248
  userType: number;
248
249
  nickname: string;
249
- roomCode: string;
250
+ authCode: string;
250
251
  debugTask: boolean;
251
252
  debugWebServer: string;
252
253
  loadingTimeout: number;
@@ -272,6 +273,7 @@ export declare class AppliParams implements IAppliParams {
272
273
  liveStreaming: boolean;
273
274
  useSeparateMediaSharePeer: boolean;
274
275
  mobileKeyboardType: number;
276
+ initResolutionType: number;
275
277
  static copyAndCreate(params?: IAppliParams): AppliParams;
276
278
  static setUpWithSDKConfig(params: IAppliParams, config: ILarkSRConfig): AppliParams;
277
279
  }
@@ -46,7 +46,9 @@ export declare enum APP_EVENT_TYPE {
46
46
  AI_VOICE_ERROR = 21,
47
47
  RTMP_STREAM_STATE = 22,
48
48
  RTMP_STREAM_ERROR = 23,
49
- RTC_RETRY_SUCCESS = 24
49
+ RTC_RETRY_SUCCESS = 24,
50
+ AerialViewStatus = 25,
51
+ AerialViewScreen = 26
50
52
  }
51
53
  export interface AppEvent extends LocalEvent<APP_EVENT_TYPE> {
52
54
  data?: any;
@@ -79,6 +81,7 @@ export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
79
81
  get recodeState(): RECORDER_STATE;
80
82
  private recoder;
81
83
  private rtcConfig;
84
+ get currentAppSize(): Msg.CloudLark.IAppResize | null | undefined;
82
85
  constructor(larksr: LarkSR);
83
86
  init(): void;
84
87
  initSharePc(): void;
@@ -91,7 +94,24 @@ export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
91
94
  inputText(text: string): void;
92
95
  sendTextToDataChannel(text: string): void;
93
96
  sendBinaryToDataChannel(binary: Uint8Array): void;
97
+ sendReStartApplication(): void;
98
+ sendApplicationSize(width: number, height: number): void;
99
+ startAerialview(viewbox: {
100
+ x: number;
101
+ y: number;
102
+ width: number;
103
+ height: number;
104
+ }, interval: number | undefined, thumbnailWidth: 120, thumbnailHeight: 120): void;
105
+ updateAerialview(viewbox: {
106
+ x: number;
107
+ y: number;
108
+ width: number;
109
+ height: number;
110
+ }): void;
111
+ stopAerialview(): void;
112
+ sendShowDebugLayout(open: boolean): void;
94
113
  sendVideoBitrateKbps(bitrateKbps: number): void;
114
+ sendVideoFps(fps: number): void;
95
115
  aiDmTextInput(text: string): number;
96
116
  startAiDmVoiceInput(): Promise<number>;
97
117
  stopAiDmVoiceInput(): number;
@@ -135,6 +155,8 @@ export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
135
155
  private onRtmpStreamingError;
136
156
  private onIceStateChange;
137
157
  retryPeerconnection(): void;
158
+ private onAerialViewStatus;
159
+ private onAerialViewScreen;
138
160
  private onShareMediaError;
139
161
  private onShareMediaInfo;
140
162
  private onShareMediaOffer;