@buoy-gg/tv-remote 7.0.36 → 7.0.39

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.
Files changed (2) hide show
  1. package/README.md +34 -62
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,89 +1,61 @@
1
1
  # @buoy-gg/tv-remote
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/@buoy-gg/tv-remote?style=flat-square&labelColor=1c1c1c&color=10B981)](https://www.npmjs.com/package/@buoy-gg/tv-remote) [![npm downloads](https://img.shields.io/npm/dm/@buoy-gg/tv-remote?style=flat-square&labelColor=1c1c1c&color=10B981)](https://www.npmjs.com/package/@buoy-gg/tv-remote)
3
+ Record remote events received by a React Native TV app and inspect them in Buoy Desktop. Desktop can send supported host-side input and replay recorded sequences. The device package observes events; it does not inject hardware presses itself.
4
4
 
5
- **Press the TV remote from Buoy Desktop — drive your Apple TV / Android TV app's D-pad, record press sequences as macros, and replay them across every connected device.**
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @buoy-gg/core @buoy-gg/external-sync @buoy-gg/tv-remote
9
+ ```
6
10
 
7
- Part of [Buoy](https://github.com/Buoy-gg/buoy) — devtools that live inside your React Native app. Install it and the TV Remote panel lights up in Buoy Desktop for that device.
11
+ ## Account setup
8
12
 
9
- ## Install
13
+ Start in a development build with a Free or Pro Buoy account key. From the app directory:
10
14
 
11
15
  ```bash
12
- npm install @buoy-gg/core @buoy-gg/tv-remote
16
+ npx --package=@buoy-gg/core buoy login
13
17
  ```
14
18
 
19
+ For Expo, initialize Buoy with the key written to `.env.local`:
20
+
15
21
  ```tsx
16
- import { FloatingDevTools } from "@buoy-gg/core";
22
+ import { Buoy } from "@buoy-gg/core";
17
23
 
18
- export default function App() {
19
- return (
20
- <>
21
- {/* your app */}
22
- <FloatingDevTools headless /> {/* TV apps run headless — no bubble */}
23
- </>
24
- );
25
- }
24
+ Buoy.init({ licenseKey: process.env.EXPO_PUBLIC_BUOY_KEY });
26
25
  ```
27
26
 
28
- ## What this package does — and deliberately does not
29
-
30
- This package **only observes**. It captures the remote events your app receives
31
- (`up`/`down`/`left`/`right`/`select`/`menu`/`playPause`) and streams them to Buoy Desktop.
27
+ For React Native CLI, pass the key through your app's environment configuration; `.env.local` is not loaded automatically. Keep the menu inside the providers used by your app. Restart the development server after installing packages. See the [Quick Start](https://buoy.gg/buoy/latest/docs/quick-start) for the complete root component.
32
28
 
33
- **Presses are injected from the host**, by Buoy Desktop shelling out to `adb shell input keyevent`
34
- (Android TV) or `idb ui key` (Apple TV simulator). That is the only honest path:
29
+ ## Connect a TV app
35
30
 
36
- - On tvOS, the two things an app *can* do in-process are post the internal `onHWKeyEvent`
37
- notification (fires the JS event, but focus never moves) and `requestTVFocus` (jumps focus,
38
- but fires no event and traverses nothing). Each is half of a press, and the missing half is
39
- the half QA cares about.
40
- - On Android, directional focus navigation for unconsumed D-pad keys happens in `ViewRootImpl`,
41
- *above* the Activity — so an in-process `dispatchKeyEvent` would fire JS events **without
42
- moving focus** exactly on the screens that are broken.
31
+ Use a compatible react-native-tvos app and follow the [TV installation guide](https://buoy.gg/buoy/latest/docs/tv/installation). Mount the core integration after account initialization:
43
32
 
44
- Host-side injection goes through `InputManager` / the simulator's HID layer — the same pipeline
45
- as a physical remote, driving the real focus engine.
33
+ ```tsx
34
+ import { FloatingDevTools } from "@buoy-gg/core";
46
35
 
47
- The package also renders **nothing**. On Android TV any focusable view in an overlay becomes a
48
- D-pad stop in the host app's focus order, so a visible tool would alter the navigation it is
49
- supposed to be testing.
36
+ <FloatingDevTools headless />;
37
+ ```
50
38
 
51
- ## Support matrix
39
+ Keep the TV app headless so a focusable developer overlay does not interfere with its navigation. Open Desktop, sign in, select the device, and open the tool's panel. A phone build is not a substitute for testing TV behavior.
52
40
 
53
- | Target | Drive-able? | Via |
54
- |---|---|---|
55
- | Android TV emulator | ✅ full fidelity | `adb -s <serial> shell input keyevent` |
56
- | Android TV device | ✅ full fidelity | same, over `adb connect <ip>:5555` |
57
- | Apple TV simulator | ✅ arrows / select / menu — ❌ play-pause | `idb ui key --udid <udid>` |
58
- | Apple TV device | ❌ replay unsupported — **record only** | (future: an XCUITest `XCUIRemote` companion) |
41
+ ## Capture and replay
59
42
 
60
- Capture is pure JS and works on every target, including retail hardware — so the
61
- **record-on-retail** workflow holds: press the physical remote on a rack device, get a macro,
62
- replay it against emulators and simulators.
43
+ Arm recording in Desktop, press a short sequence on the physical or simulated remote, and compare the received events with the app's behavior. Disarm when done. Menu capture on tvOS is opt-in and is released on disarm.
63
44
 
64
- `idb` is not part of Xcode. Without it on `PATH` the Apple TV lane is disabled with an install
65
- hint (`brew install idb-companion` + `pipx install fb-idb`).
45
+ | Target | Host input support |
46
+ | --- | --- |
47
+ | Android TV emulator or authorized device | adb input key events; the host must be able to reach the target. |
48
+ | Apple TV simulator | idb arrows, select, and menu; play/pause is unsupported in this path. |
49
+ | Physical Apple TV | Record received events; host replay is unsupported. |
66
50
 
67
- ## API
51
+ The Apple TV simulator lane requires idb separately from Xcode. Follow Desktop diagnostics and the TV guide for host setup. Capture depends on supported TV event APIs and account access; it does not guarantee every OS-level remote event reaches JavaScript.
68
52
 
69
- Everything is driven from Buoy Desktop; these exports exist for custom integrations.
53
+ For custom integrations, exports include `arm`, `disarm`, `clear`, `setMenuCapture`, `getEventsSince`, `getState`, `subscribe`, and `tvRemoteSyncAdapter`. Check `getState().supported` before treating a platform as available.
70
54
 
71
- ```ts
72
- import {
73
- arm, // start capturing
74
- disarm, // stop capturing, hand the Menu key back to the platform
75
- clear,
76
- setMenuCapture, // tvOS: route Menu to JS (opt-in, always undone on disarm)
77
- getEventsSince, // (seq) => events newer than seq
78
- getState,
79
- subscribe,
80
- tvRemoteSyncAdapter, // auto-discovered by @buoy-gg/core
81
- } from "@buoy-gg/tv-remote";
82
- ```
55
+ [Full TV Remote guide](https://buoy.gg/buoy/latest/docs/tools/tv-remote)
83
56
 
84
- On non-TV platforms `getState().supported` is `false`, the native listener is never attached,
85
- and the package costs one boolean.
57
+ ## Desktop and MCP
86
58
 
87
- ## Docs
59
+ React Native connections require `@buoy-gg/external-sync`. Follow the [Desktop connection guide](https://buoy.gg/buoy/latest/docs/desktop), sign in to Desktop separately, and confirm the selected device. [MCP](https://buoy.gg/buoy/latest/docs/mcp) also needs a process account and Pro access.
88
60
 
89
- Full documentation: <https://buoy.gg/buoy/latest/docs/tools/tv-remote>
61
+ Device data can travel over your LAN to the configured broker. Account validation makes network requests. See [Telemetry](https://buoy.gg/buoy/latest/docs/telemetry) for data-flow details.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buoy-gg/tv-remote",
3
- "version": "7.0.36",
3
+ "version": "7.0.39",
4
4
  "description": "TV remote capture for React Native TV apps — records the D-pad/select/menu events the app actually receives, so Buoy Desktop can drive and replay real remote presses. Part of Buoy devtools.",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",