@limrun/ui 0.9.0-rc.13 → 0.9.0-rc.14
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/dist/components/remote-control.d.ts +16 -24
- package/dist/index.cjs +1 -1
- package/dist/index.js +804 -755
- package/package.json +1 -1
- package/src/components/remote-control.tsx +167 -58
|
@@ -94,33 +94,25 @@ interface RemoteControlProps {
|
|
|
94
94
|
*/
|
|
95
95
|
axMaxBackoffMs?: number;
|
|
96
96
|
/**
|
|
97
|
-
*
|
|
97
|
+
* Fires whenever the iOS simulator's camera demand state changes —
|
|
98
|
+
* i.e. an app inside the sim called
|
|
99
|
+
* `[AVCaptureSession startRunning]` or `[stopRunning]`. The
|
|
100
|
+
* component handles the `navigator.mediaDevices.getUserMedia` prompt
|
|
101
|
+
* and SDP plumbing internally; this callback is purely so the host
|
|
102
|
+
* UI can render a status indicator ("simulator is using your
|
|
103
|
+
* camera", etc.).
|
|
98
104
|
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
+
* `active` reflects whether the sim is currently asking for
|
|
106
|
+
* frames. `granted` is set only on the call that follows a
|
|
107
|
+
* `getUserMedia` attempt: `true` when the user accepted the
|
|
108
|
+
* browser prompt, `false` when they denied or the call failed
|
|
109
|
+
* (in which case the limulator side switches to a black-frame
|
|
110
|
+
* fallback so the app keeps ticking).
|
|
105
111
|
*
|
|
106
|
-
*
|
|
107
|
-
* camera
|
|
108
|
-
*
|
|
109
|
-
* Lifecycle expectations:
|
|
110
|
-
* - Pass `null`/`undefined` to skip outbound camera (default).
|
|
111
|
-
* - Pass a `MediaStream` obtained from
|
|
112
|
-
* `navigator.mediaDevices.getUserMedia({ video: true })` (or any
|
|
113
|
-
* other source — screen capture, virtual camera, etc.).
|
|
114
|
-
* - Changing the `MediaStream.id` triggers a connection restart so
|
|
115
|
-
* the new track is included in the SDP offer. The reference itself
|
|
116
|
-
* is allowed to be unstable across renders — we key the reconnect
|
|
117
|
-
* on `id`, not object identity, so memoization isn't required.
|
|
118
|
-
* - Stopping the tracks (e.g. `track.stop()`) on the parent side is
|
|
119
|
-
* sufficient to cut the outbound feed without restarting; the peer
|
|
120
|
-
* connection just stops getting frames on that track. To fully
|
|
121
|
-
* detach the track from the SDP, swap the prop to `null`.
|
|
112
|
+
* Only iOS instances ever fire this callback; Android instances
|
|
113
|
+
* have no camera-injector path and stay silent.
|
|
122
114
|
*/
|
|
123
|
-
|
|
115
|
+
onCameraDemandChange?: (active: boolean, granted?: boolean) => void;
|
|
124
116
|
}
|
|
125
117
|
interface ScreenshotData {
|
|
126
118
|
dataUri: string;
|