@octane-xplat/video 0.7.3 → 0.9.0

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/README.md ADDED
@@ -0,0 +1,36 @@
1
+ # `@octane-xplat/video`
2
+
3
+ Embedded video player for Octane xplat apps: `<video>` on web and
4
+ `@nstudio/nativescript-exoplayer` on native (ExoPlayer on Android,
5
+ `AVPlayerViewController` on iOS), with a macOS entry. The OS engine owns
6
+ the pixels while all chrome is self-drawn, so `controls` looks identical
7
+ on every target.
8
+
9
+ ```sh
10
+ pnpm add @octane-xplat/video
11
+ ```
12
+
13
+ ```tsx
14
+ import { Video } from '@octane-xplat/video'
15
+
16
+ ;<Video
17
+ src="https://example.com/clip.mp4" // native also accepts ~/ bundle paths and files
18
+ poster="https://example.com/poster.jpg"
19
+ controls // self-drawn transport, default true
20
+ fit="contain" // 'contain' | 'cover' | 'fill'
21
+ muted // pair with autoPlay — browsers block unmuted autoplay
22
+ playing={isPlaying} // controlled — pair with onPlayingChange, or omit
23
+ onReady={(e) => console.log(e.duration)}
24
+ onEnded={() => console.log('done')}
25
+ bind={(h) => (handle = h)} // play/pause/seekTo(ms)/currentTime/duration + .native
26
+ />
27
+ ```
28
+
29
+ All times are milliseconds on every platform. `onError` is web-only — the
30
+ plugin players surface no error event on native. `bind.native` is the
31
+ platform surface for anything the shared props don't cover, and the
32
+ `ios`/`android`/`web` escape props apply after the shared props.
33
+
34
+ Per-target limits are recorded in
35
+ [known limits](../../docs/known-limits.md). Exercised by
36
+ [`VideoDemo`](../demos/src/VideoDemo.tsrx).
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 1,
3
- "buildId": "4c91e95c-af7f-4f52-a09c-67e0b06a65a7",
3
+ "buildId": "c505a9fe-2597-4498-bf16-9fcab5c5e3f2",
4
4
  "mode": "production",
5
5
  "capabilities": {
6
6
  "independentHydration": false
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 1,
3
- "buildId": "01ead6d0-1eb1-48b2-b52b-999a755cfbeb",
3
+ "buildId": "ca9bd9ae-1120-41bf-94e7-8e741dca5d85",
4
4
  "mode": "production",
5
5
  "capabilities": {
6
6
  "independentHydration": false
package/package.json CHANGED
@@ -1,26 +1,26 @@
1
1
  {
2
2
  "name": "@octane-xplat/video",
3
- "version": "0.7.3",
3
+ "version": "0.9.0",
4
4
  "description": "Embedded video player for Octane xplat — web <video> + @nstudio/nativescript-exoplayer (ExoPlayer / AVPlayerViewController) with self-drawn chrome",
5
5
  "keywords": [
6
- "octane",
7
- "xplat",
6
+ "android",
7
+ "avplayer",
8
8
  "cross-platform",
9
- "video",
10
- "video-player",
11
9
  "exoplayer",
12
- "avplayer",
10
+ "ios",
13
11
  "media",
14
12
  "nativescript",
15
- "ios",
16
- "android",
17
- "web"
13
+ "octane",
14
+ "video",
15
+ "video-player",
16
+ "web",
17
+ "xplat"
18
18
  ],
19
- "license": "MIT",
20
19
  "homepage": "https://github.com/octane-xplat/octane-xplat/tree/main/packages/video",
20
+ "license": "MIT",
21
21
  "repository": {
22
22
  "type": "git",
23
- "url": "git+https://github.com/octane-xplat/octane-xplat.git",
23
+ "url": "https://github.com/octane-xplat/octane-xplat",
24
24
  "directory": "packages/video"
25
25
  },
26
26
  "files": [
@@ -48,11 +48,12 @@
48
48
  "@nstudio/nativescript-exoplayer": "6.2.0"
49
49
  },
50
50
  "devDependencies": {
51
- "@nativescript-community/octane": "0.2.1",
51
+ "@nativescript-community/octane": "0.2.4",
52
52
  "@nativescript/core": "9.1.2",
53
- "@octane-xplat/ui": "0.7.3",
53
+ "@octane-xplat/ui": "0.9.0",
54
54
  "@octanejs/vite-plugin": "0.1.61",
55
55
  "octane": "0.6.3",
56
+ "tsrx-typegen": "0.2.1",
56
57
  "typescript": "5.9.3",
57
58
  "vite": "8.3.0"
58
59
  },
@@ -71,6 +72,9 @@
71
72
  }
72
73
  },
73
74
  "scripts": {
74
- "build": "vite build && vite build --mode native && tsc -p tsconfig.types.json && node ../../scripts/check-native-dist.mjs"
75
+ "build": "vite build && vite build --mode native && pnpm typegen && node ../../scripts/check-native-dist.mjs",
76
+ "typegen": "tsc -p tsconfig.types.json",
77
+ "test:packed": "node tests/packed-consumer.mjs",
78
+ "pack:check": "tsrx-typegen --pack-check"
75
79
  }
76
80
  }
package/types/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { UniversalComponent } from 'octane/universal'
2
- import type { VideoProps } from './props'
2
+ import type { VideoProps } from './props.js'
3
3
 
4
4
  export declare const Video: UniversalComponent<VideoProps>
5
- export type { VideoEvent, VideoFit, VideoHandle, VideoProps } from './props'
5
+ export type { VideoEvent, VideoFit, VideoHandle, VideoProps } from './props.js'
@@ -1,4 +1,4 @@
1
- import type { VideoProps } from './props'
1
+ import type { VideoProps } from './props.js'
2
2
 
3
- export type { VideoEvent, VideoFit, VideoHandle, VideoProps } from './props'
3
+ export type { VideoEvent, VideoFit, VideoHandle, VideoProps } from './props.js'
4
4
  export declare function Video(props: VideoProps): unknown