@xorgate/react-native 0.1.0 → 0.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/CHANGELOG.md +117 -0
- package/dist/index.d.ts +10 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -4
- package/dist/index.js.map +1 -1
- package/dist/replay-engine.d.ts +193 -0
- package/dist/replay-engine.d.ts.map +1 -0
- package/dist/replay-engine.js +843 -0
- package/dist/replay-engine.js.map +1 -0
- package/dist/replay-video.d.ts +13 -0
- package/dist/replay-video.d.ts.map +1 -0
- package/dist/replay-video.js +66 -0
- package/dist/replay-video.js.map +1 -0
- package/dist/use-replay-player.d.ts +58 -0
- package/dist/use-replay-player.d.ts.map +1 -0
- package/dist/use-replay-player.js +108 -0
- package/dist/use-replay-player.js.map +1 -0
- package/package.json +4 -2
- package/readme.md +66 -14
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replay-engine.js","sourceRoot":"","sources":["../src/replay-engine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,UAAU,GAKX,MAAM,gBAAgB,CAAC;AAMxB;;;;GAIG;AACH,MAAM,eAAe,GAAG,GAAG,CAAC;AAC5B;;;;;;;GAOG;AACH,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAChC;;;;;;;GAOG;AACH,MAAM,uBAAuB,GAAG,GAAG,CAAC;AACpC;;;;;;GAMG;AACH,MAAM,oBAAoB,GAAG,GAAG,CAAC;AACjC;;;;GAIG;AACH,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B;;;;;;;;GAQG;AACH,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAC/B,iFAAiF;AACjF,MAAM,aAAa,GAAG,IAAI,CAAC;AAC3B;;;;;GAKG;AACH,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAwD/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH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K,CAAC,CAAC,OAAO,CAAC;AAC7D,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { ViewProps } from "react-native";
|
|
3
|
+
import type { VideoContentFit } from "expo-video";
|
|
4
|
+
import type { StreamKey } from "@xorgate/react";
|
|
5
|
+
import type { UseReplayPlayer } from "./use-replay-player.js";
|
|
6
|
+
export interface ReplayVideoProps extends Omit<ViewProps, "children"> {
|
|
7
|
+
player: UseReplayPlayer;
|
|
8
|
+
streamKey: StreamKey;
|
|
9
|
+
/** Defaults to "contain", matching the web component's object-fit. */
|
|
10
|
+
contentFit?: VideoContentFit;
|
|
11
|
+
}
|
|
12
|
+
export declare function ReplayVideo(props: ReplayVideoProps): ReactNode;
|
|
13
|
+
//# sourceMappingURL=replay-video.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replay-video.d.ts","sourceRoot":"","sources":["../src/replay-video.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IACnE,MAAM,EAAE,eAAe,CAAC;IACxB,SAAS,EAAE,SAAS,CAAC;IACrB,sEAAsE;IACtE,UAAU,CAAC,EAAE,eAAe,CAAC;CAC9B;AA6CD,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,SAAS,CA0B9D"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Platform, StyleSheet, View } from "react-native";
|
|
3
|
+
import { VideoView } from "expo-video";
|
|
4
|
+
/**
|
|
5
|
+
* One replay lane's picture, and nothing else: no transport bar, no scrubber,
|
|
6
|
+
* no gap overlay, no loading state. Same minimalism as `LiveVideo` and as the
|
|
7
|
+
* web `ReplayVideo` — read `player.laneState(streamKey)` and render those
|
|
8
|
+
* yourself.
|
|
9
|
+
*
|
|
10
|
+
* What it does that a single `VideoView` cannot is hold BOTH of the lane's
|
|
11
|
+
* players mounted, the hidden one already loaded with the next segment. The
|
|
12
|
+
* boundary is then an opacity flip between two live views rather than a
|
|
13
|
+
* source change on one, which is the whole of why the seam is a picture
|
|
14
|
+
* change instead of a reload. `nativeControls` is off: the clock owns the
|
|
15
|
+
* transport, and a native scrubber would drive one segment's file rather than
|
|
16
|
+
* the replay.
|
|
17
|
+
*
|
|
18
|
+
* On Android the two views are `TextureView`s rather than the default
|
|
19
|
+
* `SurfaceView`s, and that is load-bearing — see {@link ANDROID_SURFACE}.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* What the lane's two views are rendered INTO on Android, and the one thing
|
|
23
|
+
* about this component that is not cosmetic.
|
|
24
|
+
*
|
|
25
|
+
* The seam is an opacity flip between two overlapping views, and `expo-video`
|
|
26
|
+
* draws into a `SurfaceView` by default. A `SurfaceView`'s picture is not
|
|
27
|
+
* drawn by the view hierarchy at all — it is a separate layer the system
|
|
28
|
+
* composites — so `opacity: 0` does not hide it and `zIndex` does not order it
|
|
29
|
+
* against a sibling surface. Two stacked lanes then fight over the same
|
|
30
|
+
* pixels, and the PRELOAD is the one that wins: the hidden player parks on the
|
|
31
|
+
* first frame of the NEXT segment, that still frame covers the player that is
|
|
32
|
+
* actually running, and the lane freezes for a whole segment while the clock,
|
|
33
|
+
* the map and the readouts carry on. Measured on an API 36 emulator before
|
|
34
|
+
* this line existed: 11 distinct frames in three minutes, each freeze starting
|
|
35
|
+
* within a second and a half of the hidden player reporting ready — and the
|
|
36
|
+
* LAST segment of a replay playing normally, because by then there is nothing
|
|
37
|
+
* left to preload on top of it.
|
|
38
|
+
*
|
|
39
|
+
* A `TextureView` is an ordinary view in the hierarchy, so alpha and z-order
|
|
40
|
+
* mean what they say. It costs a GPU copy per frame and cannot show
|
|
41
|
+
* DRM-protected media; a recorded lane is neither hot nor protected. iOS has
|
|
42
|
+
* no such split — `AVPlayerLayer` is a real layer — and the prop is Android's
|
|
43
|
+
* alone, so it is spread in rather than passed at all elsewhere.
|
|
44
|
+
*/
|
|
45
|
+
const ANDROID_SURFACE = { surfaceType: "textureView" };
|
|
46
|
+
export function ReplayVideo(props) {
|
|
47
|
+
const { player, streamKey, contentFit = "contain", style, ...viewProps } = props;
|
|
48
|
+
const media = player.laneMedia(streamKey);
|
|
49
|
+
// Read per render rather than once at module load: it costs nothing, and a
|
|
50
|
+
// constant frozen at import time cannot be asserted from the other platform.
|
|
51
|
+
const surface = Platform.OS === "android" ? ANDROID_SURFACE : undefined;
|
|
52
|
+
return (_jsx(View, { style: style, ...viewProps, children: media?.players.map((lanePlayer, index) => (_jsx(VideoView
|
|
53
|
+
// Positional and stable: the pair is the same two objects for the
|
|
54
|
+
// life of the lane, and only their order on screen changes.
|
|
55
|
+
, { player: lanePlayer, style: [
|
|
56
|
+
StyleSheet.absoluteFill,
|
|
57
|
+
index === media.activeIndex ? styles.front : styles.behind,
|
|
58
|
+
], contentFit: contentFit, nativeControls: false, ...surface }, index))) }));
|
|
59
|
+
}
|
|
60
|
+
const styles = StyleSheet.create({
|
|
61
|
+
front: { opacity: 1, zIndex: 2 },
|
|
62
|
+
// Mounted and decoding, invisible: this is the player holding what comes
|
|
63
|
+
// next, and it is what the seam swaps to.
|
|
64
|
+
behind: { opacity: 0, zIndex: 1 },
|
|
65
|
+
});
|
|
66
|
+
//# sourceMappingURL=replay-video.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replay-video.js","sourceRoot":"","sources":["../src/replay-video.tsx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AC,EAAE;IAChC,yEAAyE;IACzE,0CAA0C;IAC1C,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;CAClC,CAAC,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { type ReplayManifest, type StreamKey, type UseReplayPlayerCore, type UseReplayPlayerOptions } from "@xorgate/react";
|
|
2
|
+
import { type VideoPlayer } from "expo-video";
|
|
3
|
+
export type { ReplayLaneState, ReplayLaneStatus, UseReplayPlayerOptions, } from "@xorgate/react";
|
|
4
|
+
/** A lane's two players, and which one is showing. */
|
|
5
|
+
export interface ReplayLaneMedia {
|
|
6
|
+
/**
|
|
7
|
+
* Both players. Render BOTH views — the hidden one is where the next
|
|
8
|
+
* segment is already loaded, and mounting it is what makes a boundary an
|
|
9
|
+
* opacity flip instead of a reload. Two mounted views cost nothing visible
|
|
10
|
+
* (SPIKES.md §4).
|
|
11
|
+
*/
|
|
12
|
+
players: readonly [VideoPlayer, VideoPlayer];
|
|
13
|
+
/** The index in `players` whose picture belongs on screen. */
|
|
14
|
+
activeIndex: 0 | 1;
|
|
15
|
+
}
|
|
16
|
+
export interface UseReplayPlayer extends UseReplayPlayerCore {
|
|
17
|
+
/**
|
|
18
|
+
* The player currently showing this lane. Null before the manifest arrives
|
|
19
|
+
* or for a `streamKey` the replay has no lane for. This is the one-view
|
|
20
|
+
* shortcut; `ReplayVideo` uses {@link UseReplayPlayer.laneMedia} instead,
|
|
21
|
+
* because a single view cannot hold the outgoing picture across a seam.
|
|
22
|
+
*/
|
|
23
|
+
lanePlayer: (streamKey: StreamKey) => VideoPlayer | null;
|
|
24
|
+
/** Both of a lane's players and which is in front. What `ReplayVideo` renders. */
|
|
25
|
+
laneMedia: (streamKey: StreamKey) => ReplayLaneMedia | null;
|
|
26
|
+
}
|
|
27
|
+
export interface UseReplayPlayerNativeOptions extends UseReplayPlayerOptions {
|
|
28
|
+
/**
|
|
29
|
+
* How a lane's players are made. Defaults to `expo-video`'s
|
|
30
|
+
* `createVideoPlayer`; a test supplies its own.
|
|
31
|
+
*/
|
|
32
|
+
createPlayer?: () => VideoPlayer;
|
|
33
|
+
/**
|
|
34
|
+
* Every decision each lane's engine makes, prefixed with its `streamKey`.
|
|
35
|
+
* Off by default and free when unset. A seam is tens of milliseconds wide
|
|
36
|
+
* and the native player is the half you cannot step through, so this is how
|
|
37
|
+
* you find out why a boundary did or did not happen.
|
|
38
|
+
*/
|
|
39
|
+
debug?: (message: string) => void;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The headless replay player on React Native: the clock and lane logic of
|
|
43
|
+
* `@xorgate/react`'s `useReplayPlayerCore`, with each lane's media driven by
|
|
44
|
+
* two `expo-video` players instead of one `<video>` over MSE.
|
|
45
|
+
*
|
|
46
|
+
* Where the browser wrapper hands out a `laneVideoRef` and waits for an
|
|
47
|
+
* element to attach, this hook owns the media itself: a phone player needs no
|
|
48
|
+
* view to load or decode, so a lane starts as soon as the manifest describes
|
|
49
|
+
* it and a `VideoView` is only a window onto it. That also means the players
|
|
50
|
+
* outlive any one render of a tile, which is what lets a tile be unmounted
|
|
51
|
+
* and remounted (a tab change, a rotation) without re-downloading a segment.
|
|
52
|
+
*
|
|
53
|
+
* The pair per lane is created lazily and released when the lane disappears or
|
|
54
|
+
* the hook unmounts — `createVideoPlayer` is manual memory, unlike
|
|
55
|
+
* `useVideoPlayer`, and nothing else in the tree knows to free it.
|
|
56
|
+
*/
|
|
57
|
+
export declare function useReplayPlayer(manifest: ReplayManifest | null | undefined, options?: UseReplayPlayerNativeOptions): UseReplayPlayer;
|
|
58
|
+
//# sourceMappingURL=use-replay-player.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-replay-player.d.ts","sourceRoot":"","sources":["../src/use-replay-player.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC5B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAGjE,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AAExB,sDAAsD;AACtD,MAAM,WAAW,eAAe;IAC9B;;;;;OAKG;IACH,OAAO,EAAE,SAAS,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IAC7C,8DAA8D;IAC9D,WAAW,EAAE,CAAC,GAAG,CAAC,CAAC;CACpB;AAED,MAAM,WAAW,eAAgB,SAAQ,mBAAmB;IAC1D;;;;;OAKG;IACH,UAAU,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,WAAW,GAAG,IAAI,CAAC;IACzD,kFAAkF;IAClF,SAAS,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,eAAe,GAAG,IAAI,CAAC;CAC7D;AAED,MAAM,WAAW,4BAA6B,SAAQ,sBAAsB;IAC1E;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,WAAW,CAAC;IACjC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,EAC3C,OAAO,GAAE,4BAAiC,GACzC,eAAe,CA4FjB"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
2
|
+
import { useReplayPlayerCore, } from "@xorgate/react";
|
|
3
|
+
import { createVideoPlayer } from "expo-video";
|
|
4
|
+
import { ExpoVideoReplayEngine } from "./replay-engine.js";
|
|
5
|
+
/**
|
|
6
|
+
* The headless replay player on React Native: the clock and lane logic of
|
|
7
|
+
* `@xorgate/react`'s `useReplayPlayerCore`, with each lane's media driven by
|
|
8
|
+
* two `expo-video` players instead of one `<video>` over MSE.
|
|
9
|
+
*
|
|
10
|
+
* Where the browser wrapper hands out a `laneVideoRef` and waits for an
|
|
11
|
+
* element to attach, this hook owns the media itself: a phone player needs no
|
|
12
|
+
* view to load or decode, so a lane starts as soon as the manifest describes
|
|
13
|
+
* it and a `VideoView` is only a window onto it. That also means the players
|
|
14
|
+
* outlive any one render of a tile, which is what lets a tile be unmounted
|
|
15
|
+
* and remounted (a tab change, a rotation) without re-downloading a segment.
|
|
16
|
+
*
|
|
17
|
+
* The pair per lane is created lazily and released when the lane disappears or
|
|
18
|
+
* the hook unmounts — `createVideoPlayer` is manual memory, unlike
|
|
19
|
+
* `useVideoPlayer`, and nothing else in the tree knows to free it.
|
|
20
|
+
*/
|
|
21
|
+
export function useReplayPlayer(manifest, options = {}) {
|
|
22
|
+
const { createPlayer, debug, ...coreOptions } = options;
|
|
23
|
+
const core = useReplayPlayerCore(manifest, coreOptions);
|
|
24
|
+
const { lanes, attachLane } = core;
|
|
25
|
+
const createPlayerRef = useRef(createPlayer);
|
|
26
|
+
createPlayerRef.current = createPlayer;
|
|
27
|
+
const debugRef = useRef(debug);
|
|
28
|
+
debugRef.current = debug;
|
|
29
|
+
const pool = useRef(new Map());
|
|
30
|
+
const engines = useRef(new Map());
|
|
31
|
+
// Bumped when a lane's front player changes, so the views re-render and the
|
|
32
|
+
// opacity follows. Not state per lane: one counter re-renders the consumer
|
|
33
|
+
// once, whichever lane swapped.
|
|
34
|
+
const [, bumpActive] = useState(0);
|
|
35
|
+
// A string, not the array: `lanes` is a new array identity on every manifest
|
|
36
|
+
// refresh (the presigned URLs change), and re-running this effect would
|
|
37
|
+
// rebuild the players under a playing lane.
|
|
38
|
+
const laneKeys = lanes.map((lane) => lane.streamKey).join("\u0000");
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
const keys = laneKeys === "" ? [] : laneKeys.split("\u0000");
|
|
41
|
+
// Release the players of a lane this replay no longer has.
|
|
42
|
+
for (const [key, players] of [...pool.current]) {
|
|
43
|
+
if (keys.includes(key))
|
|
44
|
+
continue;
|
|
45
|
+
for (const player of players)
|
|
46
|
+
player.release();
|
|
47
|
+
pool.current.delete(key);
|
|
48
|
+
engines.current.delete(key);
|
|
49
|
+
}
|
|
50
|
+
const detachers = keys.map((streamKey) => {
|
|
51
|
+
let players = pool.current.get(streamKey);
|
|
52
|
+
if (!players) {
|
|
53
|
+
const make = createPlayerRef.current ?? (() => createVideoPlayer(null));
|
|
54
|
+
players = [make(), make()];
|
|
55
|
+
pool.current.set(streamKey, players);
|
|
56
|
+
}
|
|
57
|
+
const pair = players;
|
|
58
|
+
return attachLane(streamKey, (engineOptions) => {
|
|
59
|
+
const engine = new ExpoVideoReplayEngine({
|
|
60
|
+
...engineOptions,
|
|
61
|
+
players: pair,
|
|
62
|
+
onActivePlayerChange: () => bumpActive((v) => v + 1),
|
|
63
|
+
...(debugRef.current
|
|
64
|
+
? { onDebug: (message) => debugRef.current?.(`${streamKey}: ${message}`) }
|
|
65
|
+
: {}),
|
|
66
|
+
});
|
|
67
|
+
engines.current.set(streamKey, engine);
|
|
68
|
+
return engine;
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
return () => {
|
|
72
|
+
for (const detach of detachers)
|
|
73
|
+
detach();
|
|
74
|
+
};
|
|
75
|
+
}, [laneKeys, attachLane]);
|
|
76
|
+
// Unmount: the pool is manual memory and nothing else frees it.
|
|
77
|
+
useEffect(() => {
|
|
78
|
+
const players = pool.current;
|
|
79
|
+
const lanEngines = engines.current;
|
|
80
|
+
return () => {
|
|
81
|
+
// Engines first, players second, and explicitly rather than by trusting
|
|
82
|
+
// React's cleanup order: a `release()`d player throws on every access,
|
|
83
|
+
// so an engine torn down after its pair would throw into the tree.
|
|
84
|
+
for (const engine of lanEngines.values())
|
|
85
|
+
engine.destroy();
|
|
86
|
+
for (const pair of players.values()) {
|
|
87
|
+
for (const player of pair)
|
|
88
|
+
player.release();
|
|
89
|
+
}
|
|
90
|
+
players.clear();
|
|
91
|
+
lanEngines.clear();
|
|
92
|
+
};
|
|
93
|
+
}, []);
|
|
94
|
+
const laneMedia = useCallback((streamKey) => {
|
|
95
|
+
const players = pool.current.get(streamKey);
|
|
96
|
+
if (!players)
|
|
97
|
+
return null;
|
|
98
|
+
// The pool is the stable half: an engine can be torn down and rebuilt by
|
|
99
|
+
// the core (a new replay) while the same two players carry on.
|
|
100
|
+
return { players, activeIndex: engines.current.get(streamKey)?.activeIndex ?? 0 };
|
|
101
|
+
}, []);
|
|
102
|
+
const lanePlayer = useCallback((streamKey) => {
|
|
103
|
+
const media = laneMedia(streamKey);
|
|
104
|
+
return media ? media.players[media.activeIndex] : null;
|
|
105
|
+
}, [laneMedia]);
|
|
106
|
+
return { ...core, lanePlayer, laneMedia };
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=use-replay-player.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-replay-player.js","sourceRoot":"","sources":["../src/use-replay-player.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EACL,mBAAmB,GAKpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAoB,MAAM,YAAY,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAgD3D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,eAAe,CAC7B,QAA2C,EAC3C,UAAwC,EAAE;IAE1C,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,WAAW,EAAE,GAAG,OAAO,CAAC;IACxD,MAAM,IAAI,GAAG,mBAAmB,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IACxD,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IAEnC,MAAM,eAAe,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;IAC7C,eAAe,CAAC,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EAAE,CAAC;AAC5C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xorgate/react-native",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "React Native adapters for @xorgate/react: live telemetry over MQTT, live video over WebRTC (react-native-webrtc / RTCView), and the recorded-media replay player over expo-video.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Epye Labs",
|
|
@@ -70,13 +70,14 @@
|
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"expo-crypto": ">=13.0.0",
|
|
73
|
+
"expo-video": ">=57.0.0",
|
|
73
74
|
"react": "^18.2.0 || ^19.0.0",
|
|
74
75
|
"react-native": ">=0.76.0",
|
|
75
76
|
"react-native-webrtc": ">=124.0.0"
|
|
76
77
|
},
|
|
77
78
|
"dependencies": {
|
|
78
79
|
"@aws-crypto/sha256-js": "^5.2.0",
|
|
79
|
-
"@xorgate/react": "^0.2.
|
|
80
|
+
"@xorgate/react": "^0.2.1"
|
|
80
81
|
},
|
|
81
82
|
"devDependencies": {
|
|
82
83
|
"@testing-library/react": "^16.3.3",
|
|
@@ -84,6 +85,7 @@
|
|
|
84
85
|
"@types/react": "^19.0.0",
|
|
85
86
|
"@types/react-dom": "^19.3.0",
|
|
86
87
|
"expo-crypto": "~57.0.3",
|
|
88
|
+
"expo-video": "~57.0.4",
|
|
87
89
|
"jsdom": "^25.0.1",
|
|
88
90
|
"react": "^19.2.6",
|
|
89
91
|
"react-dom": "^19.3.0",
|
package/readme.md
CHANGED
|
@@ -1,28 +1,32 @@
|
|
|
1
1
|
# @xorgate/react-native
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@xorgate/react-native)
|
|
4
|
+
[](https://github.com/epyelabs/xorgate-react-native/actions/workflows/ci.yml)
|
|
5
|
+
[](./LICENSE)
|
|
6
|
+
|
|
3
7
|
React Native adapters for [`@xorgate/react`](https://www.npmjs.com/package/@xorgate/react).
|
|
4
|
-
Live telemetry over MQTT-over-WebSocket
|
|
5
|
-
`react-native-webrtc`'s `RTCView
|
|
6
|
-
H.264 decode behind
|
|
8
|
+
Live telemetry over MQTT-over-WebSocket, live video over WebRTC rendered by
|
|
9
|
+
`react-native-webrtc`'s `RTCView`, and recorded-media replay over `expo-video`
|
|
10
|
+
— real native video views with hardware H.264 decode behind them, not a web
|
|
11
|
+
player in a shell.
|
|
7
12
|
|
|
8
13
|
Everything pure or platform-neutral — the KVS session hardening, the telemetry
|
|
9
14
|
feed, the timeline, lanes, the replay clock, the telemetry math, the data hooks
|
|
10
15
|
— lives in `@xorgate/react` and is **re-exported from here**, so your app
|
|
11
16
|
imports from one package. What this package adds is the runtime underneath
|
|
12
|
-
(`nativePlatform`, `XorgateNativeProvider`) and the
|
|
17
|
+
(`nativePlatform`, `XorgateNativeProvider`) and the things that cannot be
|
|
13
18
|
platform-neutral because they are pixels.
|
|
14
19
|
|
|
15
|
-
**0.1.0 ships telemetry and live video.** Replay over `expo-video` is 0.2.0.
|
|
16
|
-
|
|
17
20
|
**Full reference: [docs.xorgate.io/docs/frontend-sdk](https://docs.xorgate.io/docs/frontend-sdk)**
|
|
18
21
|
|
|
19
22
|
## Install
|
|
20
23
|
|
|
21
24
|
```bash
|
|
22
|
-
npx expo install @xorgate/react-native react-native-webrtc @config-plugins/react-native-webrtc expo-crypto
|
|
25
|
+
npx expo install @xorgate/react-native react-native-webrtc @config-plugins/react-native-webrtc expo-crypto expo-video
|
|
23
26
|
```
|
|
24
27
|
|
|
25
|
-
Peers: `react`, `react-native`, `react-native-webrtc`, `expo-crypto
|
|
28
|
+
Peers: `react`, `react-native`, `react-native-webrtc`, `expo-crypto`,
|
|
29
|
+
`expo-video`.
|
|
26
30
|
`@xorgate/react` is a dependency, not a peer — one resolved copy is what makes
|
|
27
31
|
`instanceof XorgateError` hold across the boundary.
|
|
28
32
|
|
|
@@ -37,7 +41,8 @@ Add the config plugin to `app.json` / `app.config.ts`:
|
|
|
37
41
|
```
|
|
38
42
|
|
|
39
43
|
**A development build is required.** `react-native-webrtc` is a native module,
|
|
40
|
-
so Expo Go cannot run it.
|
|
44
|
+
so Expo Go cannot run it. `expo-video` is a native module too, and adding
|
|
45
|
+
either moves the native fingerprint: a Metro reload will not pick it up.
|
|
41
46
|
|
|
42
47
|
The plugin writes both an `NSCameraUsageDescription` and an
|
|
43
48
|
`NSMicrophoneUsageDescription`, and on Android adds `CAMERA`, `RECORD_AUDIO`,
|
|
@@ -249,6 +254,52 @@ and promotes it only once the renderer reports its dimensions, falling back to
|
|
|
249
254
|
the swap after 3 s so a dead stream cannot pin a stale frame. Render `RTCView`
|
|
250
255
|
yourself and you own that.
|
|
251
256
|
|
|
257
|
+
### Replay
|
|
258
|
+
|
|
259
|
+
```tsx
|
|
260
|
+
import { ReplayVideo, useReplayPlayer } from "@xorgate/react-native"
|
|
261
|
+
|
|
262
|
+
const player = useReplayPlayer(manifest, { startTs })
|
|
263
|
+
|
|
264
|
+
<ReplayVideo player={player} streamKey="cam0" style={{ aspectRatio: 16 / 9 }} />
|
|
265
|
+
<Text>{new Date(player.playheadTs).toISOString()}</Text>
|
|
266
|
+
<Button title={player.playing ? "Pause" : "Play"} onPress={player.toggle} />
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
The transport (`play`, `pause`, `toggle`, `seek`, `setRate`, `setSkipGaps`,
|
|
270
|
+
`stepBoundary`), the clock, the lanes and the per-lane `laneState` are the same
|
|
271
|
+
ones the web package exposes — `useReplayPlayer` here is `useReplayPlayerCore`
|
|
272
|
+
with native media bound to it. Everything is driven by wall-clock epoch ms, so
|
|
273
|
+
`useReplayTelemetry(deviceId, player)` tracks the video without either side
|
|
274
|
+
knowing about the other: it takes the player CORE, reads a timeline and a
|
|
275
|
+
playhead, and has no idea what is playing the video.
|
|
276
|
+
|
|
277
|
+
The manifest comes from `useReplayManifest(deviceId, …)`, or from your own API
|
|
278
|
+
on the vended-direct auth mode — same rule as `useVideoChannels` above.
|
|
279
|
+
|
|
280
|
+
**A lane is two players, not one.** A phone has no Media Source Extensions:
|
|
281
|
+
`AVPlayer` and `ExoPlayer` play a FILE, and every recorded segment is a
|
|
282
|
+
self-contained fMP4 that cannot be concatenated at runtime. So each lane gets a
|
|
283
|
+
pair — one showing the current segment while the other already holds the next —
|
|
284
|
+
and `ReplayVideo` mounts both views, the hidden one at zero opacity. A segment
|
|
285
|
+
boundary is then an opacity flip between two live views. The incoming player is
|
|
286
|
+
prepared half a second early but **not played until the outgoing one actually
|
|
287
|
+
reaches the manifest boundary**, which is what keeps the playhead continuous
|
|
288
|
+
across a seam instead of skipping the lead once per segment.
|
|
289
|
+
|
|
290
|
+
Render the views yourself with `player.laneMedia(streamKey)` (both players and
|
|
291
|
+
which is in front) or `player.lanePlayer(streamKey)` (just the front one, if
|
|
292
|
+
you can live with a reload at every boundary). `nativeControls` stays off: the
|
|
293
|
+
clock owns the transport, and a native scrubber would drive one segment's file
|
|
294
|
+
rather than the replay.
|
|
295
|
+
|
|
296
|
+
A **seek across segments is download-bound** — a whole 6-13 MB segment, 1.3-5.3
|
|
297
|
+
s on a good connection — because that is what `replaceAsync` fetches. The
|
|
298
|
+
outgoing picture is held throughout rather than going black, and
|
|
299
|
+
`player.laneState(streamKey)` plus `player.clock` are what a scrubber should
|
|
300
|
+
read. If you build a scrub thumb, seek as the thumb MOVES, not only on release:
|
|
301
|
+
the intermediate seeks warm the player the release will land on.
|
|
302
|
+
|
|
252
303
|
### Waking the live plane
|
|
253
304
|
|
|
254
305
|
The foreground edge (`AppState` → `active`) is wired for you, and on a phone it
|
|
@@ -288,9 +339,10 @@ ignores one, so firing twice costs nothing.
|
|
|
288
339
|
`@xorgate/react`'s browser-only exports — its `useLiveVideo`, `LiveVideo`,
|
|
289
340
|
`useReplayPlayer`, `ReplayVideo` and the `browser*` platform helpers — are
|
|
290
341
|
deliberately not re-exported: they need `HTMLVideoElement`, `window` or Media
|
|
291
|
-
Source Extensions.
|
|
292
|
-
|
|
293
|
-
|
|
342
|
+
Source Extensions. The four names are SHADOWED here by the native
|
|
343
|
+
implementations, so importing from this package always gets the one that works
|
|
344
|
+
on a phone. `useReplayPlayerCore`, the timeline, the lanes, the clock and the
|
|
345
|
+
replay telemetry math **are** re-exported unchanged.
|
|
294
346
|
|
|
295
347
|
## Scripts
|
|
296
348
|
|
|
@@ -298,8 +350,8 @@ arrives in 0.2.0.
|
|
|
298
350
|
into an empty project, import it as a consumer with stub peers, check the
|
|
299
351
|
export surface, scan for secret material).
|
|
300
352
|
|
|
301
|
-
The suite runs under jsdom against doubles for `react-native
|
|
302
|
-
`react-native-webrtc`, because
|
|
353
|
+
The suite runs under jsdom against doubles for `react-native`,
|
|
354
|
+
`react-native-webrtc` and `expo-video`, because none of them has a Node build. It proves the wiring —
|
|
303
355
|
which listener is attached, which prop the view gets, what happens across a
|
|
304
356
|
reconnect — and nothing about pixels or hardware decode, which are measured by
|
|
305
357
|
hand on a simulator and a phone.
|