@vmosedge/web-sdk 1.2.1 → 1.2.3

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.
@@ -270,9 +270,13 @@ interface VmosEdgeSizeChangedEvent {
270
270
 
271
271
  interface VmosEdgeChannelConnectedEvent {
272
272
  channel: "video" | "audio" | "touch";
273
+ status: VmosEdgeChannelRuntimeStatus;
273
274
  port?: number;
275
+ message?: string;
276
+ enabled?: boolean;
274
277
  allChannelsStatus?: AllChannelsStatus;
275
278
  }
279
+ type VmosEdgeChannelRuntimeStatus = "idle" | "connecting" | "connected" | "playing" | "suspended" | "recovering" | "stopped" | "error";
276
280
  interface VmosEdgeClientEventMap {
277
281
  [VmosEdgeClientEvents.SIZE_CHANGED]: VmosEdgeSizeChangedEvent;
278
282
  [VmosEdgeClientEvents.ERROR]: VmosEdgeErrorEvent;
@@ -298,6 +302,7 @@ interface VmosEdgeClientConfig {
298
302
  interface VmosEdgeClientOptions {
299
303
  config: VmosEdgeClientConfig;
300
304
  container: HTMLElement;
305
+ mediaType?: 1 | 2;
301
306
  isGroupControl?: boolean;
302
307
  retryCount?: number;
303
308
  retryInterval?: number;
@@ -308,7 +313,7 @@ interface VmosEdgeClientOptions {
308
313
  enableRightClickBack?: boolean;
309
314
  enableMiddleClickHome?: boolean;
310
315
  onInternalError?: (error: Error | string, info: {
311
- source: "channel_close" | "channel_error" | "video_recovery" | "touch_recovery" | "connect_retry" | "connect_failed";
316
+ source: "channel_close" | "channel_error" | "video_recovery" | "audio_recovery" | "touch_recovery" | "connect_retry" | "connect_failed";
312
317
  recovering?: boolean;
313
318
  errorMessage?: string;
314
319
  [key: string]: any;
@@ -330,6 +335,7 @@ interface VmosEdgeVideoDecoderStats {
330
335
  renderFps?: number;
331
336
  renderedFrames?: number;
332
337
  renderSkippedFrames?: number;
338
+ decoderType?: "webcodecs" | "tinyh264";
333
339
  }
334
340
 
335
341
  declare class VmosEdgeClient extends EventEmitter {
@@ -340,6 +346,7 @@ declare class VmosEdgeClient extends EventEmitter {
340
346
  private isGroupControl;
341
347
  private deviceTouchGroupMap;
342
348
  private config;
349
+ private mediaType;
343
350
  private renderer;
344
351
  private videoCodecPreference;
345
352
  private renderPreference;
@@ -349,6 +356,7 @@ declare class VmosEdgeClient extends EventEmitter {
349
356
  private enableMiddleClickHome;
350
357
  private onInternalError;
351
358
  private decoder;
359
+ private audioPlayer;
352
360
  private textareaManager;
353
361
  private videoWidth;
354
362
  private videoHeight;
@@ -361,16 +369,27 @@ declare class VmosEdgeClient extends EventEmitter {
361
369
  private maxRetries;
362
370
  private retryInterval;
363
371
  private isVideoRecovering;
372
+ private isAudioRecovering;
364
373
  private isTouchRecovering;
365
374
  private videoRetryCount;
375
+ private audioRetryCount;
366
376
  private touchRetryCount;
377
+ private pendingVideoKeyframeRequest;
378
+ private lastChannelStateMap;
367
379
  private stopVideoSubscription;
380
+ private stopAudioSubscription;
368
381
  private stopTouchSubscription;
382
+ private audioStartPromise;
383
+ private audioLifecycleVersion;
369
384
  private static PointerEventButtonToAndroidButton;
370
385
  static isWebCodecsSupported(): boolean;
371
386
  constructor(options: VmosEdgeClientOptions);
372
387
  private reportInternalError;
373
388
  private setupConnectionListener;
389
+ private shouldEnableAudio;
390
+ private emitChannelState;
391
+ private emitAudioError;
392
+ private updateMediaType;
374
393
  private setupChannelStatusListener;
375
394
  private initCanvas;
376
395
  private replaceCanvas;
@@ -384,15 +403,24 @@ declare class VmosEdgeClient extends EventEmitter {
384
403
  private connectWithRetry;
385
404
  private internalStart;
386
405
  private startVideoPipeline;
406
+ private getAudioErrorDetails;
407
+ private isAudioLifecycleCurrent;
408
+ private stopAudioPipelineInternal;
409
+ private startAudioPipeline;
387
410
  private recoverVideoChannel;
411
+ private recoverAudioChannel;
388
412
  private recoverTouchChannel;
389
413
  private createVideoStream;
414
+ private createAudioStream;
390
415
  private setupTouchBlocking;
391
416
  private performHandshake;
417
+ private performAudioHandshake;
392
418
  setGroupControlMode(enabled: boolean): void;
393
419
  joinGroupControl(config: VmosEdgeClientConfig[]): void;
394
420
  leaveGroupControl(config: VmosEdgeClientConfig[]): void;
395
421
  stop(): void;
422
+ enableAudio(): Promise<void>;
423
+ disableAudio(): void;
396
424
  private emitSizeChanged;
397
425
  private mapCoordinates;
398
426
  private updateCanvasSize;
@@ -402,6 +430,8 @@ declare class VmosEdgeClient extends EventEmitter {
402
430
  private handleContextMenu;
403
431
  private handlePointerEvent;
404
432
  private sendTouch;
433
+ private requestVideoKeyframe;
434
+ private flushPendingVideoKeyframeRequest;
405
435
  private handleWheelEvent;
406
436
  updateScrollSensitivity(speedRatio: number): void;
407
437
  setHoverMoveKeep(enabled: boolean): void;
@@ -427,4 +457,4 @@ declare class VmosEdgeClient extends EventEmitter {
427
457
  }
428
458
 
429
459
  export { AndroidKeyCode, AndroidKeyEventAction, AndroidMetaState, AndroidMotionEventAction, AndroidMotionEventButton, VmosEdgeClient, VmosEdgeClientEvents, VmosEdgeErrorCode, VmosEdgeErrorType };
430
- export type { AllChannelsStatus, ChannelStatus, VmosEdgeChannelConnectedEvent, VmosEdgeClientConfig, VmosEdgeClientEventListener, VmosEdgeClientEventMap, VmosEdgeClientEventName, VmosEdgeClientOptions, VmosEdgeErrorEvent, VmosEdgeReconnectingEvent, VmosEdgeSizeChangedEvent, VmosEdgeVideoDecoderStats };
460
+ export type { AllChannelsStatus, ChannelStatus, VmosEdgeChannelConnectedEvent, VmosEdgeChannelRuntimeStatus, VmosEdgeClientConfig, VmosEdgeClientEventListener, VmosEdgeClientEventMap, VmosEdgeClientEventName, VmosEdgeClientOptions, VmosEdgeErrorEvent, VmosEdgeReconnectingEvent, VmosEdgeSizeChangedEvent, VmosEdgeVideoDecoderStats };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vmosedge/web-sdk",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.es.js",
6
6
  "types": "./dist/types/index.d.ts",