@vmosedge/web-sdk 1.1.9 → 1.2.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/dist/index.cjs.js +2 -2
- package/dist/index.es.js +2 -2
- package/dist/index.global.js +2 -2
- package/dist/types/index.d.ts +30 -2
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -219,6 +219,7 @@ declare const VmosEdgeClientEvents: {
|
|
|
219
219
|
readonly GROUP_CONTROL_JOINED: "group-control-joined";
|
|
220
220
|
readonly GROUP_CONTROL_LEAVE: "group-control-leave";
|
|
221
221
|
readonly VIDEO_DECODER_STATS: "video-decoder-stats";
|
|
222
|
+
readonly RECONNECTING: "reconnecting";
|
|
222
223
|
};
|
|
223
224
|
type VmosEdgeClientEventName = (typeof VmosEdgeClientEvents)[keyof typeof VmosEdgeClientEvents];
|
|
224
225
|
declare enum VmosEdgeErrorType {
|
|
@@ -247,6 +248,11 @@ declare enum VmosEdgeErrorCode {
|
|
|
247
248
|
RENDERER_ERROR = "RENDERER_ERROR",
|
|
248
249
|
UNKNOWN_ERROR = "UNKNOWN_ERROR"
|
|
249
250
|
}
|
|
251
|
+
interface VmosEdgeReconnectingEvent {
|
|
252
|
+
channel: "video" | "audio" | "touch" | "all";
|
|
253
|
+
attempt: number;
|
|
254
|
+
reason: string;
|
|
255
|
+
}
|
|
250
256
|
interface VmosEdgeErrorEvent {
|
|
251
257
|
type: VmosEdgeErrorType;
|
|
252
258
|
code: VmosEdgeErrorCode;
|
|
@@ -277,6 +283,7 @@ interface VmosEdgeClientEventMap {
|
|
|
277
283
|
[VmosEdgeClientEvents.GROUP_CONTROL_JOINED]: VmosEdgeClientConfig;
|
|
278
284
|
[VmosEdgeClientEvents.GROUP_CONTROL_LEAVE]: VmosEdgeClientConfig;
|
|
279
285
|
[VmosEdgeClientEvents.VIDEO_DECODER_STATS]: VmosEdgeVideoDecoderStats;
|
|
286
|
+
[VmosEdgeClientEvents.RECONNECTING]: VmosEdgeReconnectingEvent;
|
|
280
287
|
}
|
|
281
288
|
type VmosEdgeClientEventListener<T extends VmosEdgeClientEventName> = (data: VmosEdgeClientEventMap[T]) => void;
|
|
282
289
|
interface VmosEdgeClientConfig {
|
|
@@ -298,6 +305,14 @@ interface VmosEdgeClientOptions {
|
|
|
298
305
|
renderPreference?: "default" | "high-performance" | "low-power";
|
|
299
306
|
hoverMoveKeep?: boolean;
|
|
300
307
|
scrollSpeedRatio?: number;
|
|
308
|
+
enableRightClickBack?: boolean;
|
|
309
|
+
enableMiddleClickHome?: boolean;
|
|
310
|
+
onInternalError?: (error: Error | string, info: {
|
|
311
|
+
source: "channel_close" | "channel_error" | "video_recovery" | "touch_recovery" | "connect_retry" | "connect_failed";
|
|
312
|
+
recovering?: boolean;
|
|
313
|
+
errorMessage?: string;
|
|
314
|
+
[key: string]: any;
|
|
315
|
+
}) => void;
|
|
301
316
|
}
|
|
302
317
|
interface VmosEdgeVideoDecoderStats {
|
|
303
318
|
fps: number;
|
|
@@ -330,6 +345,9 @@ declare class VmosEdgeClient extends EventEmitter {
|
|
|
330
345
|
private renderPreference;
|
|
331
346
|
private scrollSpeedRatio;
|
|
332
347
|
private hoverMoveKeep;
|
|
348
|
+
private enableRightClickBack;
|
|
349
|
+
private enableMiddleClickHome;
|
|
350
|
+
private onInternalError;
|
|
333
351
|
private decoder;
|
|
334
352
|
private textareaManager;
|
|
335
353
|
private videoWidth;
|
|
@@ -342,11 +360,17 @@ declare class VmosEdgeClient extends EventEmitter {
|
|
|
342
360
|
private retryCount;
|
|
343
361
|
private maxRetries;
|
|
344
362
|
private retryInterval;
|
|
363
|
+
private isVideoRecovering;
|
|
364
|
+
private isTouchRecovering;
|
|
365
|
+
private videoRetryCount;
|
|
366
|
+
private touchRetryCount;
|
|
345
367
|
private stopVideoSubscription;
|
|
346
368
|
private stopTouchSubscription;
|
|
347
369
|
private static PointerEventButtonToAndroidButton;
|
|
348
370
|
static isWebCodecsSupported(): boolean;
|
|
349
371
|
constructor(options: VmosEdgeClientOptions);
|
|
372
|
+
private reportInternalError;
|
|
373
|
+
private setupConnectionListener;
|
|
350
374
|
private setupChannelStatusListener;
|
|
351
375
|
private initCanvas;
|
|
352
376
|
private replaceCanvas;
|
|
@@ -359,9 +383,11 @@ declare class VmosEdgeClient extends EventEmitter {
|
|
|
359
383
|
start(): Promise<void>;
|
|
360
384
|
private connectWithRetry;
|
|
361
385
|
private internalStart;
|
|
386
|
+
private startVideoPipeline;
|
|
387
|
+
private recoverVideoChannel;
|
|
388
|
+
private recoverTouchChannel;
|
|
362
389
|
private createVideoStream;
|
|
363
390
|
private setupTouchBlocking;
|
|
364
|
-
private setupTouch;
|
|
365
391
|
private performHandshake;
|
|
366
392
|
setGroupControlMode(enabled: boolean): void;
|
|
367
393
|
joinGroupControl(config: VmosEdgeClientConfig[]): void;
|
|
@@ -396,7 +422,9 @@ declare class VmosEdgeClient extends EventEmitter {
|
|
|
396
422
|
};
|
|
397
423
|
getConfig(): VmosEdgeClientConfig | null;
|
|
398
424
|
getScale(): number;
|
|
425
|
+
setRightClickBackEnabled(enabled: boolean): void;
|
|
426
|
+
setMiddleClickHomeEnabled(enabled: boolean): void;
|
|
399
427
|
}
|
|
400
428
|
|
|
401
429
|
export { AndroidKeyCode, AndroidKeyEventAction, AndroidMetaState, AndroidMotionEventAction, AndroidMotionEventButton, VmosEdgeClient, VmosEdgeClientEvents, VmosEdgeErrorCode, VmosEdgeErrorType };
|
|
402
|
-
export type { AllChannelsStatus, ChannelStatus, VmosEdgeChannelConnectedEvent, VmosEdgeClientConfig, VmosEdgeClientEventListener, VmosEdgeClientEventMap, VmosEdgeClientEventName, VmosEdgeClientOptions, VmosEdgeErrorEvent, VmosEdgeSizeChangedEvent, VmosEdgeVideoDecoderStats };
|
|
430
|
+
export type { AllChannelsStatus, ChannelStatus, VmosEdgeChannelConnectedEvent, VmosEdgeClientConfig, VmosEdgeClientEventListener, VmosEdgeClientEventMap, VmosEdgeClientEventName, VmosEdgeClientOptions, VmosEdgeErrorEvent, VmosEdgeReconnectingEvent, VmosEdgeSizeChangedEvent, VmosEdgeVideoDecoderStats };
|