yjz-web-sdk 1.0.9-beta.5 → 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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "yjz-web-sdk",
3
3
  "private": false,
4
- "version": "1.0.9-beta.5",
4
+ "version": "1.0.11-beta.1",
5
5
  "type": "module",
6
6
  "description": "针对于亚矩阵项目的云手机投屏和屏幕控制",
7
7
  "license": "Apache-2.0",
@@ -32,28 +32,18 @@
32
32
  "preview": "vite preview"
33
33
  },
34
34
  "dependencies": {
35
- "@libmedia/avcodec": "1.0.1",
36
- "@libmedia/avformat": "1.0.1",
37
- "@libmedia/avnetwork": "1.0.1",
38
- "@libmedia/avrender": "1.0.1",
39
- "@libmedia/avutil": "1.0.1",
40
- "@libmedia/cheap": "~1.0.2",
41
- "@libmedia/common": "~2.0.1",
42
35
  "element-plus": "^2.10.5",
43
36
  "eventemitter3": "^5.0.1",
44
- "rollup-plugin-copy": "^3.5.0",
45
37
  "terser": "^5.39.0",
46
38
  "vue": "^3.5.13",
47
39
  "webrtc-adapter": "^9.0.1"
48
40
  },
49
41
  "devDependencies": {
50
- "@libmedia/rollup-plugin-typescript": "^12.2.4",
51
42
  "@types/node": "^22.14.1",
52
- "@vitejs/plugin-vue": "^6.0.1",
43
+ "@vitejs/plugin-vue": "^5.2.1",
53
44
  "@vue/tsconfig": "^0.7.0",
54
45
  "rollup-plugin-visualizer": "5.9.3",
55
- "tslib": "^2.8.1",
56
- "typescript": "~5.8.0",
46
+ "typescript": "~5.7.2",
57
47
  "vite": "^6.2.0",
58
48
  "vite-plugin-css-injected-by-js": "3.3.1",
59
49
  "vite-plugin-dts": "3.6.3",
@@ -1,9 +0,0 @@
1
- export interface Dimension {
2
- width: number;
3
- height: number;
4
- }
5
- export interface TouchEventData {
6
- clientX: number;
7
- clientY: number;
8
- timeStamp: DOMHighResTimeStamp;
9
- }
@@ -1,20 +0,0 @@
1
- export declare class MapCache {
2
- private key;
3
- private maxSize;
4
- private defaultExpire;
5
- constructor(key: string, maxSize?: number, expireMs?: number);
6
- /** 从 localStorage 读取 Map(自动清理过期的 item) */
7
- getMap(): Map<string, any>;
8
- /** 保存 Map(每个值都有独立的 timestamp/expire) */
9
- private saveMap;
10
- /** 设置值(支持单项自定义过期时间) */
11
- set(key: string, value: any, expireMs?: number): void;
12
- /** 获取值(单项过期会自动清除) */
13
- get(key: string): any;
14
- /** 检查是否存在且未过期 */
15
- has(key: string): boolean;
16
- /** 删除 */
17
- delete(key: string): void;
18
- /** 清空 */
19
- clear(): void;
20
- }
@@ -1,10 +0,0 @@
1
- export declare class Canvas2DRenderer {
2
- private canvas;
3
- private ctx;
4
- constructor(canvas: HTMLCanvasElement | OffscreenCanvas);
5
- render(frame: VideoFrame): void;
6
- /** 清空画布 */
7
- clear(): void;
8
- /** 完全销毁 Renderer,释放引用和上下文 */
9
- destroy(): void;
10
- }
@@ -1,16 +0,0 @@
1
- export declare class WebGLRenderer {
2
- private canvas;
3
- private ctx;
4
- private program;
5
- private texture;
6
- private vertexBuffer;
7
- static vertexShaderSource: string;
8
- static fragmentShaderSource: string;
9
- constructor(type: "webgl" | "webgl2", canvas: HTMLCanvasElement | OffscreenCanvas);
10
- private createProgram;
11
- render(frame: VideoFrame): void;
12
- /** 清空画布,但不销毁资源 */
13
- clear(): void;
14
- /** 销毁 WebGLRenderer,释放所有资源 */
15
- destroy(): void;
16
- }
@@ -1,18 +0,0 @@
1
- export declare class WebGPURenderer {
2
- private canvas;
3
- private ctx;
4
- private started;
5
- private format;
6
- private device;
7
- private pipeline;
8
- private sampler;
9
- static vertexShaderSource: string;
10
- static fragmentShaderSource: string;
11
- constructor(canvas: HTMLCanvasElement | OffscreenCanvas);
12
- start(): Promise<void>;
13
- render(frame: VideoFrame | HTMLVideoElement | HTMLCanvasElement | HTMLImageElement): Promise<void>;
14
- /** 清空画布 */
15
- clear(): Promise<void>;
16
- /** 销毁 WebGPURenderer,释放所有 GPU 资源 */
17
- destroy(): void;
18
- }
@@ -1,13 +0,0 @@
1
- export interface RenderingCapabilities {
2
- webgpu: boolean;
3
- webgl2: boolean;
4
- webgl1: boolean;
5
- canvas2d: boolean;
6
- best: RendererType;
7
- }
8
- export type RendererType = 'webgpu' | 'webgl2' | 'webgl1' | 'canvas2d' | 'none';
9
- export interface DecoderSupportResult {
10
- supported: boolean;
11
- hardware: boolean;
12
- software: boolean;
13
- }
@@ -1,18 +0,0 @@
1
- import { AVCodecID } from "@libmedia/avutil";
2
- import { DecoderSupportResult, RenderingCapabilities } from "../types";
3
- export declare function getWasm(type: 'decoder' | 'encoder', codecId?: AVCodecID): string;
4
- export declare enum VideoCodecType {
5
- H264 = "h264",
6
- H265 = "h265",
7
- VP8 = "vp8",
8
- VP9 = "vp9",
9
- AV1 = "av1"
10
- }
11
- export declare function isDecoderSupported(codec: VideoCodecType): Promise<boolean>;
12
- export declare function checkDecoderSupport(codec: VideoCodecType): Promise<DecoderSupportResult>;
13
- export declare function isEncoderSupported(codec: VideoCodecType): Promise<boolean>;
14
- export declare const isWebGPUSupported: () => Promise<boolean>;
15
- export declare const isWebGL2Supported: (canvas?: HTMLCanvasElement) => boolean;
16
- export declare const isWebGL1Supported: (canvas?: HTMLCanvasElement) => boolean;
17
- export declare const isCanvas2DSupported: (canvas?: HTMLCanvasElement) => boolean;
18
- export declare const detectRenderingCapabilities: () => Promise<RenderingCapabilities>;
@@ -1 +0,0 @@
1
- export {};