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.
- package/dist/larksr-web-sdk.min.js +1 -1
- package/dist/types/api.d.ts +4 -3
- package/dist/types/appli_params.d.ts +4 -2
- package/dist/types/lark/application.d.ts +23 -1
- package/dist/types/lark/peer_connection.d.ts +6 -2
- package/dist/types/lark/peer_connection_media_share.d.ts +1 -1
- package/dist/types/larksr.d.ts +66 -5
- package/dist/types/localization/language.d.ts +2 -1
- package/dist/types/operation/operation.d.ts +5 -0
- package/dist/types/screen_state.d.ts +10 -2
- package/dist/types/utils/unit.d.ts +6 -0
- package/dist/types/utils/webgl_utils.d.ts +48 -0
- package/package.json +71 -71
- package/types/api.d.ts +4 -3
- package/types/appli_params.d.ts +4 -2
- package/types/lark/application.d.ts +23 -1
- package/types/lark/peer_connection.d.ts +6 -2
- package/types/lark/peer_connection_media_share.d.ts +1 -1
- package/types/larksr.d.ts +66 -5
- package/types/localization/language.d.ts +2 -1
- package/types/operation/operation.d.ts +5 -0
- package/types/screen_state.d.ts +10 -2
- package/types/utils/unit.d.ts +6 -0
- package/types/utils/webgl_utils.d.ts +48 -0
- package/dist/types/lark/custom.d.ts +0 -7
- package/dist/types/protobuf/cloudlark.d.ts +0 -8578
- package/dist/types/utils/ios-inner-height.d.ts +0 -4
- package/types/lark/custom.d.ts +0 -7
- package/types/protobuf/cloudlark.d.ts +0 -8578
- package/types/utils/ios-inner-height.d.ts +0 -4
|
@@ -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<
|
|
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<
|
|
142
|
+
requestUserMediaPermission(constraints?: MediaStreamConstraints): Promise<unknown>;
|
|
143
143
|
/**
|
|
144
144
|
* 接收到sdp
|
|
145
145
|
* @param des sdp
|
package/types/larksr.d.ts
CHANGED
|
@@ -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
|
|
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
|
-
|
|
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
|
-
|
|
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, };
|
|
@@ -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;
|
package/types/screen_state.d.ts
CHANGED
|
@@ -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
|
}
|
package/types/utils/unit.d.ts
CHANGED
|
@@ -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
|
+
}
|