@ray-js/api 1.4.6 → 1.4.8

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.
@@ -147,6 +147,14 @@ interface VideoContext {
147
147
  sendDanmu(data: { text: string; color: string }): void
148
148
  }
149
149
 
150
+ interface NativeVideoContext {
151
+ play(): void
152
+ pause(): void
153
+ stop(): void
154
+ playbackRate(rate: number): void
155
+ seek(position: number): void
156
+ }
157
+
150
158
  interface AddMarker extends Callback {
151
159
  markers: any[]
152
160
  clear?: boolean
@@ -263,6 +271,7 @@ declare namespace ty {
263
271
  export function canvasGetImageData(param: CanvasGetImageDataProps): void
264
272
  export function canvasPutImageData(param: CanvasPutImageDataProps): void
265
273
  export function createVideoContext(id: string): VideoContext
274
+ export function createNativeVideoContext(id: string): NativeVideoContext
266
275
  export function createMapContext(mapId: string): MapContext
267
276
  export function createIpcPlayerContext(deviceId: string): IpcContext
268
277
  export function createCameraContext(): CameraContext
package/lib/viewAPI.d.ts CHANGED
@@ -8,6 +8,7 @@ export declare const createCanvasContext: typeof ty.createCanvasContext;
8
8
  export declare const canvasGetImageData: typeof ty.canvasGetImageData;
9
9
  export declare const canvasPutImageData: typeof ty.canvasPutImageData;
10
10
  export declare const createVideoContext: typeof ty.createVideoContext;
11
+ export declare const createNativeVideoContext: typeof ty.createNativeVideoContext;
11
12
  export declare const createMapContext: typeof ty.createMapContext;
12
13
  export declare const createIpcPlayerContext: typeof ty.createIpcPlayerContext;
13
14
  export declare const createCameraContext: typeof ty.createCameraContext;
package/lib/viewAPI.js CHANGED
@@ -10,6 +10,7 @@ export const createCanvasContext = factory('createCanvasContext');
10
10
  export const canvasGetImageData = factory('canvasGetImageData');
11
11
  export const canvasPutImageData = factory('canvasPutImageData');
12
12
  export const createVideoContext = factory('createVideoContext');
13
+ export const createNativeVideoContext = factory('createNativeVideoContext');
13
14
  export const createMapContext = factory('createMapContext');
14
15
  export const createIpcPlayerContext = factory('createIpcPlayerContext');
15
16
  export const createCameraContext = factory('createCameraContext');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/api",
3
- "version": "1.4.6",
3
+ "version": "1.4.8",
4
4
  "description": "Ray universal api",
5
5
  "keywords": [
6
6
  "ray"
@@ -29,13 +29,13 @@
29
29
  "watch": "ray start --type=component"
30
30
  },
31
31
  "dependencies": {
32
- "@ray-js/framework": "^1.4.6",
33
- "@ray-js/router": "^1.4.6",
32
+ "@ray-js/framework": "1.4.8",
33
+ "@ray-js/router": "1.4.8",
34
34
  "@ray-js/wechat": "^0.0.33",
35
35
  "base64-browser": "^1.0.1"
36
36
  },
37
37
  "devDependencies": {
38
- "@ray-js/cli": "^1.4.6",
38
+ "@ray-js/cli": "1.4.8",
39
39
  "art-template": "^4.13.2",
40
40
  "fs-extra": "^10.1.0",
41
41
  "miniprogram-api-typings": "^3.12.0",