yjz-web-sdk 1.0.10 → 1.0.11-beta.1
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/lib/components/RemotePlayer/index.vue.d.ts +1 -73
- package/lib/composables/useCursorStyle.d.ts +1 -1
- package/lib/composables/useKeyboardControl.d.ts +1 -1
- package/lib/composables/useMouseTouchControl.d.ts +4 -4
- package/lib/composables/useRemoteVideo.d.ts +8 -25
- package/lib/composables/useResizeObserver.d.ts +1 -1
- package/lib/core/data/WebRtcError.d.ts +1 -2
- 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 +2 -5
- package/lib/core/rtc/WebRTCConfig.d.ts +1 -1
- package/lib/core/rtc/WebRtcNegotiate.d.ts +2 -2
- package/lib/core/signal/SignalingClient.d.ts +1 -1
- package/lib/core/util/TurnTestUtil.d.ts +2 -2
- package/lib/yjz-web-sdk.js +496 -1236
- package/package.json +5 -16
- package/lib/components/RemotePlayer/type.d.ts +0 -9
- 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
|
@@ -1,74 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
interface Props {
|
|
3
|
-
streamAngle?: number;
|
|
4
|
-
videoAngle?: number;
|
|
5
|
-
cursorType?: number;
|
|
6
|
-
cloudDeviceSize?: Dimension;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
bgColor?: string;
|
|
9
|
-
isGroup?: boolean;
|
|
10
|
-
}
|
|
11
|
-
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
12
|
-
streamAngle: number;
|
|
13
|
-
videoAngle: number;
|
|
14
|
-
cursorType: number;
|
|
15
|
-
cloudDeviceSize: () => {
|
|
16
|
-
width: number;
|
|
17
|
-
height: number;
|
|
18
|
-
};
|
|
19
|
-
disabled: boolean;
|
|
20
|
-
bgColor: string;
|
|
21
|
-
isGroup: boolean;
|
|
22
|
-
}>>, {
|
|
23
|
-
startDecode: (arrayBuffer: ArrayBuffer) => void;
|
|
24
|
-
stopPlay: () => void;
|
|
25
|
-
remoteVideoElement: import("vue").Ref<HTMLCanvasElement, HTMLCanvasElement>;
|
|
26
|
-
startPlay: (track: MediaStreamTrack) => void;
|
|
27
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
28
|
-
loadedSuccess: (...args: any[]) => void;
|
|
29
|
-
loadedFailure: (...args: any[]) => void;
|
|
30
|
-
channelEvent: (...args: any[]) => void;
|
|
31
|
-
groupControlEvent: (...args: any[]) => void;
|
|
32
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
33
|
-
streamAngle: number;
|
|
34
|
-
videoAngle: number;
|
|
35
|
-
cursorType: number;
|
|
36
|
-
cloudDeviceSize: () => {
|
|
37
|
-
width: number;
|
|
38
|
-
height: number;
|
|
39
|
-
};
|
|
40
|
-
disabled: boolean;
|
|
41
|
-
bgColor: string;
|
|
42
|
-
isGroup: boolean;
|
|
43
|
-
}>>> & Readonly<{
|
|
44
|
-
onLoadedSuccess?: (...args: any[]) => any;
|
|
45
|
-
onLoadedFailure?: (...args: any[]) => any;
|
|
46
|
-
onChannelEvent?: (...args: any[]) => any;
|
|
47
|
-
onGroupControlEvent?: (...args: any[]) => any;
|
|
48
|
-
}>, {
|
|
49
|
-
cloudDeviceSize: Dimension;
|
|
50
|
-
streamAngle: number;
|
|
51
|
-
videoAngle: number;
|
|
52
|
-
isGroup: boolean;
|
|
53
|
-
cursorType: number;
|
|
54
|
-
disabled: boolean;
|
|
55
|
-
bgColor: string;
|
|
56
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
1
|
+
declare const _default: any;
|
|
57
2
|
export default _default;
|
|
58
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
59
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
60
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
61
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
62
|
-
} : {
|
|
63
|
-
type: import('vue').PropType<T[K]>;
|
|
64
|
-
required: true;
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
type __VLS_WithDefaults<P, D> = {
|
|
68
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
69
|
-
default: D[K];
|
|
70
|
-
}> : P[K];
|
|
71
|
-
};
|
|
72
|
-
type __VLS_Prettify<T> = {
|
|
73
|
-
[K in keyof T]: T[K];
|
|
74
|
-
} & {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Ref } from 'vue';
|
|
2
|
-
export default function useCursorStyle(cursorType: Ref<number>):
|
|
2
|
+
export default function useCursorStyle(cursorType: Ref<number>): any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChannelDataType } from "../core/data/WebrtcDataType";
|
|
1
|
+
import { ChannelDataType } from "../core/data/WebrtcDataType.ts";
|
|
2
2
|
import { type Ref } from "vue";
|
|
3
3
|
export default function useKeyboardControl(disabled: Ref<boolean>, emit: (event: 'channelEvent', payload: ChannelDataType, data: any) => void): {
|
|
4
4
|
startListening: () => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Ref } from 'vue';
|
|
2
|
-
import { ChannelDataType } from "../core/data/WebrtcDataType";
|
|
3
|
-
import type { Dimension } from "../components/RemotePlayer/
|
|
2
|
+
import { ChannelDataType } from "../core/data/WebrtcDataType.ts";
|
|
3
|
+
import type { Dimension } from "../components/RemotePlayer/index.ts";
|
|
4
4
|
interface MouseTouchControlOptions {
|
|
5
|
-
remoteVideoElement: Ref<
|
|
5
|
+
remoteVideoElement: Ref<HTMLVideoElement | null>;
|
|
6
6
|
cloudDeviceSize: Ref<Dimension>;
|
|
7
7
|
streamAngle: Ref<number>;
|
|
8
8
|
videoAngle: Ref<number>;
|
|
@@ -11,7 +11,7 @@ interface MouseTouchControlOptions {
|
|
|
11
11
|
emit: (event: 'channelEvent', payload: ChannelDataType, data: any) => void;
|
|
12
12
|
}
|
|
13
13
|
export default function useMouseTouchControl(options: MouseTouchControlOptions): {
|
|
14
|
-
isPointerDown:
|
|
14
|
+
isPointerDown: any;
|
|
15
15
|
handleMouseDown: (event: PointerEvent) => void;
|
|
16
16
|
handleMouseMove: (event: PointerEvent) => void;
|
|
17
17
|
handleMouseEnter: (event: PointerEvent) => void;
|
|
@@ -1,29 +1,12 @@
|
|
|
1
1
|
import type { Ref } from 'vue';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
width?: number;
|
|
10
|
-
height?: number;
|
|
11
|
-
}, Partial<Dimension> | {
|
|
12
|
-
width?: number;
|
|
13
|
-
height?: number;
|
|
14
|
-
}>;
|
|
15
|
-
dimensions: Ref<{
|
|
16
|
-
width: number;
|
|
17
|
-
height: number;
|
|
18
|
-
}, Dimension | {
|
|
19
|
-
width: number;
|
|
20
|
-
height: number;
|
|
21
|
-
}>;
|
|
22
|
-
widthRadio: Ref<number, number>;
|
|
23
|
-
heightRadio: Ref<number, number>;
|
|
24
|
-
screenStatus: Ref<boolean, boolean>;
|
|
2
|
+
export default function useRemoteVideo(videoContainer: Ref<HTMLElement | null>, remoteVideoElement: Ref<HTMLVideoElement | null>, videoAngle: Ref<number>, emit: (event: 'loadedSuccess') => void): {
|
|
3
|
+
videoSize: any;
|
|
4
|
+
remoteVideo: any;
|
|
5
|
+
dimensions: any;
|
|
6
|
+
widthRadio: any;
|
|
7
|
+
heightRadio: any;
|
|
8
|
+
screenStatus: any;
|
|
25
9
|
initVideoContainer: () => void;
|
|
26
|
-
startDecode: (arrayBuffer: ArrayBuffer) => void;
|
|
27
|
-
stopPlay: () => void;
|
|
28
10
|
startPlay: (track: MediaStreamTrack) => void;
|
|
11
|
+
stopPlay: () => void;
|
|
29
12
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Ref } from 'vue';
|
|
2
|
-
import type { Dimension } from "../components/RemotePlayer/
|
|
2
|
+
import type { Dimension } from "../components/RemotePlayer/index.ts";
|
|
3
3
|
export default function useResizeObserver(target: Ref<HTMLElement | null>, dimension: Ref<Dimension>): void;
|
|
@@ -11,8 +11,7 @@ export declare enum ChannelDataType {
|
|
|
11
11
|
ActionCommandEvent = "ActionCommandEvent",
|
|
12
12
|
ActionUpdateCloudStatus = "ActionUpdateCloudStatus",
|
|
13
13
|
ActionGesture = "ActionGesture",
|
|
14
|
-
ActionTrack = "ActionTrack"
|
|
15
|
-
RequestKeyFrame = "RequestKeyFrame"
|
|
14
|
+
ActionTrack = "ActionTrack"
|
|
16
15
|
}
|
|
17
16
|
export declare enum ActionCommandEventValue {
|
|
18
17
|
ENABLE = "ENABLE",
|
|
@@ -175,7 +174,6 @@ export declare class ChannelData {
|
|
|
175
174
|
static clarity(data: any): ChannelData;
|
|
176
175
|
static switchAudio(data: any): ChannelData;
|
|
177
176
|
static changeSender(data: any): ChannelData;
|
|
178
|
-
static requestKeyFrame(data: any): ChannelData;
|
|
179
177
|
}
|
|
180
178
|
export interface RTCStatsReportExtended extends RTCStatsReport {
|
|
181
179
|
get(id: string): RTCStats | undefined;
|
|
@@ -210,11 +208,3 @@ export interface ScreenShotData {
|
|
|
210
208
|
roomId: string;
|
|
211
209
|
base64: string;
|
|
212
210
|
}
|
|
213
|
-
export declare class BitReader {
|
|
214
|
-
private data;
|
|
215
|
-
private byteOffset;
|
|
216
|
-
private bitOffset;
|
|
217
|
-
constructor(data: Uint8Array);
|
|
218
|
-
readBits(count: number): number;
|
|
219
|
-
readUEG(): number;
|
|
220
|
-
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EventEmitter } from 'eventemitter3';
|
|
2
|
-
import type { WebRTCConfigOptions } from '../rtc/WebRTCConfig';
|
|
2
|
+
import type { WebRTCConfigOptions } from '../rtc/WebRTCConfig.ts';
|
|
3
3
|
import { WebRTCSdk } from '../WebRTCSdk';
|
|
4
|
-
import type { ChannelDataType } from '../data/WebrtcDataType';
|
|
4
|
+
import type { ChannelDataType } from '../data/WebrtcDataType.ts';
|
|
5
5
|
import type { ConnectorType } from '../data/MessageType';
|
|
6
6
|
export declare class SdkController extends EventEmitter {
|
|
7
7
|
private readonly sdk;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from 'eventemitter3';
|
|
2
|
-
import type { WebRTCConfig } from "./WebRTCConfig";
|
|
3
|
-
import { ChannelDataType } from "../data/WebrtcDataType";
|
|
2
|
+
import type { WebRTCConfig } from "./WebRTCConfig.ts";
|
|
3
|
+
import { ChannelDataType } from "../data/WebrtcDataType.ts";
|
|
4
4
|
export declare class WebRTCClient extends EventEmitter {
|
|
5
5
|
private readonly config;
|
|
6
6
|
private peerConnection;
|
|
@@ -9,7 +9,6 @@ export declare class WebRTCClient extends EventEmitter {
|
|
|
9
9
|
private isPushingStream;
|
|
10
10
|
private isPushingLocalStream;
|
|
11
11
|
private dataChannel;
|
|
12
|
-
private videoDataChannel;
|
|
13
12
|
private statsTimer;
|
|
14
13
|
private lastReportTime;
|
|
15
14
|
private lastBytesReceived;
|
|
@@ -24,7 +23,6 @@ export declare class WebRTCClient extends EventEmitter {
|
|
|
24
23
|
private rafId;
|
|
25
24
|
private currentMedia;
|
|
26
25
|
private fileImage?;
|
|
27
|
-
private isFirst;
|
|
28
26
|
constructor(config: WebRTCConfig);
|
|
29
27
|
startPush(useBackCamera?: boolean): Promise<void>;
|
|
30
28
|
handleOffer(offerSdp: string): void;
|
|
@@ -42,7 +40,6 @@ export declare class WebRTCClient extends EventEmitter {
|
|
|
42
40
|
stopPush(): void;
|
|
43
41
|
private resetPeerConnection;
|
|
44
42
|
private configDataChannel;
|
|
45
|
-
private handleVideoChannelMessage;
|
|
46
43
|
private handleDataChannelMessage;
|
|
47
44
|
private checkStats;
|
|
48
45
|
private processStatsOptimized;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type WebRtcError } from "../data/WebRtcError";
|
|
2
|
-
import { WebRTCConfig } from "./WebRTCConfig";
|
|
1
|
+
import { type WebRtcError } from "../data/WebRtcError.ts";
|
|
2
|
+
import { WebRTCConfig } from "./WebRTCConfig.ts";
|
|
3
3
|
export declare const setRemoteDescriptionWithHandleOffer: (peerConnection: RTCPeerConnection, sdp: string, sendAnswer?: (sdp: string) => void, onError?: (err: WebRtcError) => void) => void;
|
|
4
4
|
export declare const createPeerConnection: (config: WebRTCConfig) => RTCPeerConnection;
|
|
5
5
|
export declare const configPeerConnection: (peerConnection: RTCPeerConnection, onICEMessage: (candidate: string) => void, onTrack?: (track: MediaStreamTrack) => void, onConnectState?: (state: RTCIceConnectionState) => void, onError?: (error: WebRtcError) => void) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from 'eventemitter3';
|
|
2
|
-
import type { WebRTCConfig } from '../rtc/WebRTCConfig';
|
|
2
|
+
import type { WebRTCConfig } from '../rtc/WebRTCConfig.ts';
|
|
3
3
|
import { ConnectorType } from '../data/MessageType';
|
|
4
4
|
export declare class SignalingClient extends EventEmitter {
|
|
5
5
|
private config;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TurnSelectionResult, TurnServerConfig, TurnTestResult, TurnTestSummary } from '../data/TurnType';
|
|
2
|
-
import type { WebRTCConfigOptions } from '../rtc/WebRTCConfig';
|
|
1
|
+
import type { TurnSelectionResult, TurnServerConfig, TurnTestResult, TurnTestSummary } from '../data/TurnType.ts';
|
|
2
|
+
import type { WebRTCConfigOptions } from '../rtc/WebRTCConfig.ts';
|
|
3
3
|
export declare const testTurnServer: (turnConfig: TurnServerConfig, timeoutMs?: number) => Promise<TurnTestResult>;
|
|
4
4
|
export declare const testMultipleTurnServers: (servers: string[], timeoutMs?: number) => Promise<TurnTestSummary>;
|
|
5
5
|
export declare const areTurnListsEmpty: (options: WebRTCConfigOptions) => boolean;
|