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.
- package/dist/doc/en/config.md +228 -0
- package/dist/doc/en/dev.md +84 -0
- package/dist/doc/en/event_codes.md +286 -0
- package/dist/doc/en/events.md +229 -0
- package/dist/doc/en/functions.md +603 -0
- package/dist/doc/en/index.md +115 -0
- package/dist/doc/en/member_variables.md +407 -0
- package/dist/doc/en/multi_media_3_2_401.md +84 -0
- package/dist/doc/en/sdkid_encryption.md +40 -0
- package/dist/doc/en/update.md +462 -0
- package/dist/doc/zh_CN/config.md +243 -0
- package/dist/doc/zh_CN/event_codes.md +286 -0
- package/dist/doc/zh_CN/events.md +229 -0
- package/dist/doc/zh_CN/functions.md +658 -0
- package/dist/doc/zh_CN/index.md +84 -0
- package/dist/doc/zh_CN/member_variables.md +431 -0
- package/dist/doc/zh_CN/multi_media_3_2_401.md +84 -0
- package/dist/doc/zh_CN/sdkid_encryption.md +40 -0
- package/dist/doc/zh_CN/update.md +579 -0
- package/dist/larksr-web-sdk.min.js +1 -1
- package/dist/types/api.d.ts +5 -3
- package/dist/types/appli_params.d.ts +13 -8
- package/dist/types/config.d.ts +0 -1
- package/dist/types/lark/Worker.d.ts +3 -0
- package/dist/types/lark/application.d.ts +29 -2
- package/dist/types/lark/custom.d.ts +6 -6
- package/dist/types/lark/peer_connection.d.ts +7 -2
- package/dist/types/lark/peer_connection_media_share.d.ts +1 -1
- package/dist/types/lark/webcodec.d.ts +40 -0
- package/dist/types/lark/webcodecs.generated.d.ts +417 -0
- package/dist/types/lark/websocket_channel.d.ts +1 -0
- package/dist/types/lark/websocket_proxy.d.ts +2 -0
- package/dist/types/larksr.d.ts +85 -12
- package/dist/types/localization/language.d.ts +2 -1
- package/dist/types/operation/operation.d.ts +5 -0
- package/dist/types/protobuf/cloudlark.d.ts +1198 -102
- package/dist/types/screen_state.d.ts +12 -4
- package/dist/types/utils/lock_pointer.d.ts +2 -1
- package/dist/types/utils/scale_mode.d.ts +19 -0
- package/dist/types/utils/unit.d.ts +6 -0
- package/dist/types/utils/webgl_utils.d.ts +48 -0
- package/package.json +3 -2
- package/types/api.d.ts +5 -3
- package/types/appli_params.d.ts +13 -8
- package/types/config.d.ts +0 -1
- package/types/lark/Worker.d.ts +3 -0
- package/types/lark/application.d.ts +29 -2
- package/types/lark/custom.d.ts +6 -6
- package/types/lark/peer_connection.d.ts +7 -2
- package/types/lark/peer_connection_media_share.d.ts +1 -1
- package/types/lark/webcodec.d.ts +40 -0
- package/types/lark/webcodecs.generated.d.ts +417 -0
- package/types/lark/websocket_channel.d.ts +1 -0
- package/types/lark/websocket_proxy.d.ts +2 -0
- package/types/larksr.d.ts +85 -12
- package/types/localization/language.d.ts +2 -1
- package/types/operation/operation.d.ts +5 -0
- package/types/protobuf/cloudlark.d.ts +1198 -102
- package/types/screen_state.d.ts +12 -4
- package/types/utils/lock_pointer.d.ts +2 -1
- package/types/utils/scale_mode.d.ts +19 -0
- package/types/utils/unit.d.ts +6 -0
- package/types/utils/webgl_utils.d.ts +48 -0
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;
|
|
@@ -93,8 +101,8 @@ export default class ScreenState extends EventBase<SCREEN_EVENT_TYPE, ScreenEven
|
|
|
93
101
|
scaleX: number;
|
|
94
102
|
scaleY: number;
|
|
95
103
|
};
|
|
96
|
-
get initCursorMode():
|
|
97
|
-
set initCursorMode(mode:
|
|
104
|
+
get initCursorMode(): number;
|
|
105
|
+
set initCursorMode(mode: number);
|
|
98
106
|
private _initCursorMode;
|
|
99
107
|
get isMobile(): boolean;
|
|
100
108
|
private _isMobile;
|
|
@@ -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
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { EventBase, LocalEvent } from '../event/event_base';
|
|
2
2
|
export declare const enum LockPointerEventType {
|
|
3
3
|
LockPointChange = 0,
|
|
4
|
-
LockPointFailed = 1
|
|
4
|
+
LockPointFailed = 1,
|
|
5
|
+
LockPointNotSupport = 2
|
|
5
6
|
}
|
|
6
7
|
export interface LockPointerEvent extends LocalEvent<LockPointerEventType> {
|
|
7
8
|
isLockPointer: boolean;
|
|
@@ -19,6 +19,25 @@ export default class ScaleMode {
|
|
|
19
19
|
* 拉伸模式,完全填充屏幕但不保留宽高比
|
|
20
20
|
*/
|
|
21
21
|
static FILL_STRETCH: string;
|
|
22
|
+
/**
|
|
23
|
+
* 如果太大出现滚动条
|
|
24
|
+
*/
|
|
25
|
+
static SCROLL_AUTO: string;
|
|
26
|
+
/**
|
|
27
|
+
* 水平方向出现滚动条,垂直方向填充满
|
|
28
|
+
*/
|
|
29
|
+
static SCROLL_X_FILL_Y: string;
|
|
30
|
+
/**
|
|
31
|
+
* 水平方向出现滚动条,垂直方向不放大,不出现滚动条
|
|
32
|
+
*/
|
|
33
|
+
static SCROLL_X_CONTAIN_Y: string;
|
|
34
|
+
/**
|
|
35
|
+
* 水平方向出现滚动条,垂直方向不放大
|
|
36
|
+
*/
|
|
37
|
+
/**
|
|
38
|
+
* 水平方向填满,垂直方向出现滚动条
|
|
39
|
+
*/
|
|
40
|
+
static SCROLL_Y_FILL_X: string;
|
|
22
41
|
/**
|
|
23
42
|
* offset 控制条的高度
|
|
24
43
|
*/
|
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
|
+
}
|