yjz-web-sdk 1.0.10 → 1.0.11-beta.10
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/README.md +90 -0
- package/lib/ScreenControlUtil-D4-BTCo9.js +5230 -0
- package/lib/components/RemotePlayer/index.vue.d.ts +1 -73
- package/lib/composables/useCursorStyle.d.ts +1 -1
- package/lib/composables/useKeyboardControl.d.ts +5 -1
- package/lib/composables/useMouseTouchControl.d.ts +5 -4
- package/lib/composables/useRemoteVideo.d.ts +8 -25
- package/lib/composables/useResizeObserver.d.ts +1 -1
- package/lib/core/WebRTCSdk.d.ts +3 -0
- package/lib/core/data/WebRtcError.d.ts +3 -3
- package/lib/core/data/WebrtcDataType.d.ts +1 -11
- package/lib/core/groupctrl/SdkController.d.ts +2 -2
- package/lib/core/rtc/WebRTCClient.d.ts +13 -3
- package/lib/core/rtc/WebRTCConfig.d.ts +3 -1
- package/lib/core/rtc/WebRtcNegotiate.d.ts +3 -3
- package/lib/core/signal/SignalingClient.d.ts +1 -1
- package/lib/core/util/KeyCodeUtil.d.ts +6 -0
- package/lib/core/util/TurnTestUtil.d.ts +4 -4
- package/lib/index.d.ts +3 -3
- package/lib/uni/KeyboardControl.d.ts +53 -0
- package/lib/uni/Logger.d.ts +13 -0
- package/lib/uni/MouseTouchControl.d.ts +56 -0
- package/lib/uni/RemoteCanvasController.d.ts +11 -0
- package/lib/uni/RemoteController.d.ts +23 -0
- package/lib/uni/RemoteVideoController.d.ts +38 -0
- package/lib/uni/WebRTCWrapper.d.ts +57 -0
- package/lib/uni/constants.d.ts +42 -0
- package/lib/uni/index.d.ts +110 -0
- package/lib/{components/RemotePlayer → uni}/type.d.ts +1 -0
- package/lib/uni-sdk.js +1263 -0
- package/lib/yjz-web-sdk.js +312 -5955
- package/package.json +10 -20
- package/lib/core/data/TurnType.d.ts +0 -21
- package/lib/core/util/MapCache.d.ts +0 -20
- package/lib/render/Canvas2DRenderer.d.ts +0 -10
- package/lib/render/WebGLRenderer.d.ts +0 -16
- package/lib/render/WebGPURenderer.d.ts +0 -18
- package/lib/types/index.d.ts +0 -13
- package/lib/util/WasmUtil.d.ts +0 -17
- package/lib/worker/worker.d.ts +0 -1
- package/src/assets/icon/circle.svg +0 -1
- package/src/assets/icon/triangle.svg +0 -1
- package/src/assets/wasm/h264-atomic.wasm +0 -0
- package/src/assets/wasm/h264-simd.wasm +0 -0
- package/src/components/RemotePlayer/index.vue +0 -170
- package/src/components/RemotePlayer/type.ts +0 -11
- package/src/composables/useCursorStyle.ts +0 -15
- package/src/composables/useKeyboardControl.ts +0 -32
- package/src/composables/useMouseTouchControl.ts +0 -158
- package/src/composables/useRemoteVideo.ts +0 -248
- package/src/composables/useResizeObserver.ts +0 -27
- package/src/core/WebRTCSdk.ts +0 -561
- package/src/core/data/MessageType.ts +0 -70
- package/src/core/data/TurnType.ts +0 -25
- package/src/core/data/WebRtcError.ts +0 -93
- package/src/core/data/WebrtcDataType.ts +0 -354
- package/src/core/groupctrl/GroupCtrlSocketManager.ts +0 -94
- package/src/core/groupctrl/SdkController.ts +0 -96
- package/src/core/rtc/WebRTCClient.ts +0 -862
- package/src/core/rtc/WebRTCConfig.ts +0 -86
- package/src/core/rtc/WebRtcNegotiate.ts +0 -164
- package/src/core/signal/SignalingClient.ts +0 -221
- package/src/core/util/FileTypeUtils.ts +0 -75
- package/src/core/util/KeyCodeUtil.ts +0 -162
- package/src/core/util/Logger.ts +0 -83
- package/src/core/util/MapCache.ts +0 -135
- package/src/core/util/ScreenControlUtil.ts +0 -174
- package/src/core/util/TurnTestUtil.ts +0 -123
- package/src/env.d.ts +0 -30
- package/src/index.ts +0 -61
- package/src/render/Canvas2DRenderer.ts +0 -38
- package/src/render/WebGLRenderer.ts +0 -150
- package/src/render/WebGPURenderer.ts +0 -194
- package/src/types/index.ts +0 -15
- package/src/types/webgpu.d.ts +0 -1158
- package/src/util/WasmUtil.ts +0 -291
- package/src/worker/worker.ts +0 -292
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export declare enum DocumentEvent {
|
|
2
|
+
KEY_DOWN = "keydown",
|
|
3
|
+
POINTER_ENTER = "pointerenter",
|
|
4
|
+
POINTER_LEAVE = "pointerleave",
|
|
5
|
+
POINTER_DOWN = "pointerdown",
|
|
6
|
+
POINTER_UP = "pointerup",
|
|
7
|
+
POINTER_MOVE = "pointermove",
|
|
8
|
+
WHEEL = "wheel",
|
|
9
|
+
COMPOSITION_START = "compositionstart",
|
|
10
|
+
COMPOSITION_END = "compositionend",
|
|
11
|
+
INPUT = "input"
|
|
12
|
+
}
|
|
13
|
+
export declare enum MenuKey {
|
|
14
|
+
HOME = 3,
|
|
15
|
+
BACK = 4,
|
|
16
|
+
TASK = 187
|
|
17
|
+
}
|
|
18
|
+
export declare enum ClarityLevel {
|
|
19
|
+
FLUENT = 1,// 流畅
|
|
20
|
+
STANDARD = 2,// 标清
|
|
21
|
+
HIGH_DEFINITION = 3
|
|
22
|
+
}
|
|
23
|
+
export declare const CLARITY_LEVEL_LIST: {
|
|
24
|
+
label: string;
|
|
25
|
+
value: ClarityLevel;
|
|
26
|
+
}[];
|
|
27
|
+
export declare enum GestureMode {
|
|
28
|
+
THREE_BUTTON_NAVIGATION = 0,
|
|
29
|
+
GESTURE_NAVIGATION = 2
|
|
30
|
+
}
|
|
31
|
+
export declare const CLASS_NAME: {
|
|
32
|
+
CONTAINER_CLASS_NAME: string;
|
|
33
|
+
KEYBOARD_CONTAINER_CLASS_NAME: string;
|
|
34
|
+
REMOTE_VIDEO_CLASS_NAME: string;
|
|
35
|
+
INPUT_METHOD_EDITOR_CLASS_NAME: string;
|
|
36
|
+
};
|
|
37
|
+
export declare enum CursorType {
|
|
38
|
+
DEFAULT_CURSOR = 0,
|
|
39
|
+
CIRCLE_CURSOR = 1,
|
|
40
|
+
TRIANGLE_CURSOR = 2
|
|
41
|
+
}
|
|
42
|
+
export declare const cursorClassMap: Record<CursorType, string>;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import EventEmitter from 'eventemitter3';
|
|
2
|
+
import { type WebRTCConfigOptions } from '../core/rtc/WebRTCConfig';
|
|
3
|
+
import RemoteController from './RemoteController';
|
|
4
|
+
import MouseTouchControl from './MouseTouchControl';
|
|
5
|
+
import KeyboardControl from './KeyboardControl';
|
|
6
|
+
import WebRTCWrapper from './WebRTCWrapper';
|
|
7
|
+
import Logger from './Logger';
|
|
8
|
+
import { ClarityLevel, CursorType } from './constants';
|
|
9
|
+
import { Dimension, MakeOptional } from './type';
|
|
10
|
+
interface SDKParams {
|
|
11
|
+
mountedElement: string | HTMLElement;
|
|
12
|
+
connectConfig: MakeOptional<WebRTCConfigOptions, 'isGroup'>;
|
|
13
|
+
cloudDeviceSize?: Dimension;
|
|
14
|
+
cursorType?: number;
|
|
15
|
+
remoteViewBackgroundColor?: string;
|
|
16
|
+
videoAngle?: number;
|
|
17
|
+
isGroup?: boolean;
|
|
18
|
+
disabledVerticalSwipe?: boolean;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
enabledDebug?: boolean;
|
|
21
|
+
enabledIMEKeyboard?: boolean;
|
|
22
|
+
enabledDecode?: boolean;
|
|
23
|
+
}
|
|
24
|
+
declare enum SDKEvents {
|
|
25
|
+
CHANNEL_EVENT = "channelEvent",
|
|
26
|
+
GROUP_CONTROL_EVENT = "groupControlEvent",
|
|
27
|
+
LOADED_SUCCESS = "loadedSuccess",
|
|
28
|
+
LOADED_FAILURE = "loadedFailure"
|
|
29
|
+
}
|
|
30
|
+
declare class UniSDK extends EventEmitter {
|
|
31
|
+
static EVENTS: {
|
|
32
|
+
CONNECTED: string;
|
|
33
|
+
DIRECTION_CHANGE: string;
|
|
34
|
+
RESIZE: string;
|
|
35
|
+
CLARITY_LEVEL_CHANGE: string;
|
|
36
|
+
GESTURE_MODE_CHANGE: string;
|
|
37
|
+
RECEIVE_MEDIA_STREAM_TRACK: string;
|
|
38
|
+
RECEIVE_ARRAY_BUFFER: string;
|
|
39
|
+
ERROR: string;
|
|
40
|
+
STOP_CONNECT: string;
|
|
41
|
+
STATISTIC_INFO: string;
|
|
42
|
+
CLICK_DATA: import("../index").ChannelDataType;
|
|
43
|
+
CHANNEL_EVENT: SDKEvents.CHANNEL_EVENT;
|
|
44
|
+
GROUP_CONTROL_EVENT: SDKEvents.GROUP_CONTROL_EVENT;
|
|
45
|
+
LOADED_SUCCESS: SDKEvents.LOADED_SUCCESS;
|
|
46
|
+
LOADED_FAILURE: SDKEvents.LOADED_FAILURE;
|
|
47
|
+
};
|
|
48
|
+
static CURSOR_TYPE: typeof CursorType;
|
|
49
|
+
static CLARITY_LEVEL: typeof ClarityLevel;
|
|
50
|
+
static CLARITY_LEVEL_LIST: {
|
|
51
|
+
label: string;
|
|
52
|
+
value: ClarityLevel;
|
|
53
|
+
}[];
|
|
54
|
+
logger: Logger;
|
|
55
|
+
mountedElement: SDKParams['mountedElement'];
|
|
56
|
+
connectConfig: SDKParams['connectConfig'];
|
|
57
|
+
cloudDeviceSize: SDKParams['cloudDeviceSize'];
|
|
58
|
+
videoContainerElement: HTMLDivElement | null;
|
|
59
|
+
containerResizeObserver: ResizeObserver | null;
|
|
60
|
+
remoteViewBackgroundColor: string;
|
|
61
|
+
remoteController: RemoteController | null;
|
|
62
|
+
webRtcSDKInstance: WebRTCWrapper | null;
|
|
63
|
+
mouseTouchControl: MouseTouchControl | null;
|
|
64
|
+
keyboardControl: KeyboardControl | null;
|
|
65
|
+
isGroup: boolean;
|
|
66
|
+
videoAngle: number;
|
|
67
|
+
streamAngle: number;
|
|
68
|
+
widthRatio: number;
|
|
69
|
+
heightRatio: number;
|
|
70
|
+
cursorType: CursorType;
|
|
71
|
+
disabled: boolean;
|
|
72
|
+
enabledDebug: boolean;
|
|
73
|
+
disabledVerticalSwipe: boolean;
|
|
74
|
+
enabledIMEKeyboard: boolean;
|
|
75
|
+
enabledDecode: boolean;
|
|
76
|
+
constructor({ mountedElement, connectConfig, cloudDeviceSize, disabled, enabledDebug, isGroup, disabledVerticalSwipe, enabledIMEKeyboard, remoteViewBackgroundColor, videoAngle, cursorType, enabledDecode }: SDKParams);
|
|
77
|
+
setVideoAngle(angle: number): void;
|
|
78
|
+
getVideoAngle(): number;
|
|
79
|
+
setStreamAngle(angle: number): void;
|
|
80
|
+
setCloudDeviceSize(value: Dimension): void;
|
|
81
|
+
validateParams(): boolean;
|
|
82
|
+
init(): void;
|
|
83
|
+
createVideoContainerElement(): HTMLDivElement;
|
|
84
|
+
setKeyboardContainerSize(width: number, height: number): void;
|
|
85
|
+
createNode(): void;
|
|
86
|
+
calculateSize(w: number, h: number): void;
|
|
87
|
+
addContainerResizeListener(): void;
|
|
88
|
+
offContainerResizeListener(): void;
|
|
89
|
+
addEvent(): void;
|
|
90
|
+
offEvents(): void;
|
|
91
|
+
createRemoteController(): RemoteController;
|
|
92
|
+
createMouseTouchControl(remoteElement: HTMLElement): MouseTouchControl;
|
|
93
|
+
createKeyboardControl(): KeyboardControl;
|
|
94
|
+
mounted(): Promise<void>;
|
|
95
|
+
startConnection(): void;
|
|
96
|
+
goBack(): void;
|
|
97
|
+
goHome(): void;
|
|
98
|
+
goTask(): void;
|
|
99
|
+
enableAudio(): void;
|
|
100
|
+
disableAudio(): void;
|
|
101
|
+
changeLevel(value: number): void;
|
|
102
|
+
sendClipboardData(value: string): void;
|
|
103
|
+
openIMEKeyboard(): void;
|
|
104
|
+
closeIMEKeyboard(): void;
|
|
105
|
+
switchToGestureNavigation(): void;
|
|
106
|
+
switchToThreeButtonNavigation(): void;
|
|
107
|
+
destroy(): void;
|
|
108
|
+
}
|
|
109
|
+
export * from './type';
|
|
110
|
+
export { UniSDK };
|