Skip to content

v0.3.0

Choose a tag to compare

@lutz-grex lutz-grex released this 16 Nov 10:42
97e7a40

@mobilerun/react 0.3.0

Features

  • useDeviceStream takes an SDK device object. Pass device: sdk.devices.fromId(id) from @mobilerun/sdk 6.2 or later. The existing { client, deviceId } form keeps working with older SDKs; peer range stays >=2.0.0. A fresh device object on every render does not refetch (the hook keys on device id and client). New exported types: UseDeviceStreamDeviceOptions, SdkDeviceHandle.
  • Task approvals. <TaskApproval /> and useTaskApproval show a pending approval of a running task and send the decision through your backend, so the API key stays on the server.

Fixes

  • Polling no longer stops after one failed fetch. Transient errors retry at the polling interval; 4xx responses other than 408/429 stop retrying; a successful fetch clears the error.

Docs and example

  • README and example use the SDK object API. The Quick start keeps the API key on the server; the browser only receives the stream URL and token. Webhooks are verified with verifyWebhook from @mobilerun/sdk (a signed body that is not JSON gets 400 invalid_json, from SDK 6.2.1).

Verified against a live cloud Android device on a development environment: live stream through the example's device route and webhook handling.