@feedbackrelay/react-native-replay 0.1.0 → 0.1.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/AGENTS.md CHANGED
@@ -4,7 +4,9 @@ Read [README.md](README.md) and the host instructions. This optional package ext
4
4
 
5
5
  ## Public integration
6
6
 
7
- Install @feedbackrelay/react-native@0.1.0 and @feedbackrelay/react-native-replay@0.1.0 from npm. Contributors can build/install both archives as shown in README.md to test source changes. Native sources and resources are already included; do not add standalone Swift/Kotlin packages to the same host.
7
+ Install @feedbackrelay/react-native@0.1.1 and @feedbackrelay/react-native-replay@0.1.1 from npm. Contributors can build/install both archives as shown in README.md to test source changes. Native sources and resources are already included; do not add standalone Swift/Kotlin packages to the same host.
8
+
9
+ Version `0.1.1` includes the Android upload connection handling change for `Stream Closed` failures.
8
10
 
9
11
  Use Node.js 26/npm for this checkout's build and packaging commands; Node is a development tool, not a device/browser requirement.
10
12
 
@@ -24,6 +26,8 @@ Keep one actual media worker, at most 4 leases, 60-second frozen lifetime and 30
24
26
 
25
27
  Sidechannel: POST same relay URL + /replays, body {protocolVersion:1,submissionId,video:{mimeType:'video/mp4',byteSize,width,height,durationMs,startedBeforeEventMs,endedBeforeEventMs}} or omitted reason. Only pending+upload response permits binary multipart fields+file; storage has no key. Complete with POST /replays/{id}/complete body{}. Handle pending and terminal ready/omitted/failed/expired responses. No GET configuration or PNG fallback.
26
28
 
29
+ Android multipart uses `Expect: 100-continue` before consuming the native MP4 stream. The system HTTP client may reconnect before the body; add no SDK retry loop. Upload servers and proxies must handle this handshake. Keep JSON/iOS/web behavior, inferred boundaries and storage credential isolation unchanged.
30
+
27
31
  Read-only currentFPS:number|undefined reads existing native selected-rate state, not measured/encoded/delivered throughput. Inactive/backgrounded/unavailable/destroyed or failed native reads yield undefined. Do not add a sampling timer/upload or bridge calls after destroy.
28
32
 
29
33
  ## Offline local preview
package/README.md CHANGED
@@ -11,31 +11,12 @@ Use React Native `>=0.86.3 <0.87`, New Architecture and compatible React `^19.2.
11
11
  From your app folder, install the core SDK and optional replay addon:
12
12
 
13
13
  ```sh
14
- npm install @feedbackrelay/react-native@0.1.0 @feedbackrelay/react-native-replay@0.1.0
14
+ npm install @feedbackrelay/react-native@0.1.1 @feedbackrelay/react-native-replay@0.1.1
15
15
  ```
16
16
 
17
17
  Install pods/rebuild using your host's normal native workflow. Expo can use `npx expo run:ios` or `npx expo run:android`. JavaScript reload alone cannot install the module. The package includes its canonical recorder sources and privacy resources; do not install separate Swift/Kotlin replay packages in the same app.
18
18
 
19
- ### Local archives for contributors
20
-
21
- To test source changes before publishing another version, use Node.js 26/npm and a complete repository checkout to pack the core first, then this addon:
22
-
23
- ```sh
24
- cd "/path/to/relay-sdk/sdk/react-native"
25
- npm ci
26
- npm pack
27
- cd "/path/to/relay-sdk/sdk/react-native-replay"
28
- npm ci
29
- npm pack
30
- ```
31
-
32
- Install both archives in your app:
33
-
34
- ```sh
35
- npm install "/path/to/feedbackrelay-react-native-0.1.0.tgz" "/path/to/feedbackrelay-react-native-replay-0.1.0.tgz"
36
- ```
37
-
38
- Reinstall the archives after source changes and rebuild when native code changes.
19
+ Version `0.1.1` includes the Android upload connection handling change for `Stream Closed` failures.
39
20
 
40
21
  ## 2. Attach a recorder
41
22
 
@@ -115,11 +96,34 @@ Clips use H.264 in MP4, even dimensions up to 720 pixels per edge and at most 2
115
96
 
116
97
  After the event receipt, the addon sends `POST /v1/sdk/teams/{teamId}/relays/{relayId}/replays` with `X-Relay-Key`, `protocolVersion:1`, the original `submissionId` and either video metadata or an omission reason. A pending response supplies a binary upload ticket. The addon uploads multipart `video/mp4` without the key on the storage request, then sends `{}` to `/replays/{id}/complete`.
117
98
 
99
+ The current source uses `Expect: 100-continue` for Android multipart uploads, checking the connection before reading the MP4 stream. The system HTTP client may reconnect before sending the body; the addon adds no retry loop. Your upload server and proxies must handle this handshake; [S3 POST supports it](https://docs.aws.amazon.com/AmazonS3/latest/developerguide/RESTObjectPOST.html). JSON, iOS and web requests are unchanged.
100
+
118
101
  The backend validates file length, dimensions and timing. Video failures stay separate from event acceptance. See the shared [service contract](https://github.com/apal21/relay-sdk/blob/main/sdk/CONTRACT.md).
119
102
 
120
103
  After a receipt, cancelling the completed send does not stop its separate media job. Destroy that client to cancel its media, or clear the recorder to discard all retained history and media.
121
104
 
122
- ## Development checks
105
+ ## Contributor development
106
+
107
+ To test future source changes locally, use Node.js 26/npm and a complete repository checkout to pack the core first, then this addon:
108
+
109
+ ```sh
110
+ cd "/path/to/relay-sdk/sdk/react-native"
111
+ npm ci
112
+ npm pack
113
+ cd "/path/to/relay-sdk/sdk/react-native-replay"
114
+ npm ci
115
+ npm pack
116
+ ```
117
+
118
+ Install both generated archives in a separate app:
119
+
120
+ ```sh
121
+ npm install "/path/to/feedbackrelay-react-native-0.1.1.tgz" "/path/to/feedbackrelay-react-native-replay-0.1.1.tgz"
122
+ ```
123
+
124
+ Reinstall the archives after source changes and restart the bundler. Rebuild when native code changes. Normal app integration uses npm above.
125
+
126
+ ### Checks
123
127
 
124
128
  ```sh
125
129
  npm run build
package/lib/delivery.js CHANGED
@@ -18,8 +18,12 @@ function validateVideo(video) {
18
18
  }
19
19
  async function request(url, init, signal, json = true, deadline = Infinity) {
20
20
  check(signal, deadline);
21
- const transport = init.body instanceof FormData ? require('react-native/Libraries/Network/fetch').fetch : fetch;
22
- const response = await transport(url, { ...init, signal, credentials: 'omit', redirect: 'error' });
21
+ const multipart = init.body instanceof FormData;
22
+ const transport = multipart ? require('react-native/Libraries/Network/fetch').fetch : fetch;
23
+ // Check stale Android connections before consuming a one-shot file stream.
24
+ const headers = multipart && require('react-native').Platform.OS === 'android'
25
+ ? { ...init.headers, Expect: '100-continue' } : init.headers;
26
+ const response = await transport(url, { ...init, headers, signal, credentials: 'omit', redirect: 'error' });
23
27
  check(signal, deadline);
24
28
  if (!response.ok)
25
29
  throw new Error('Replay request failed.');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedbackrelay/react-native-replay",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Optional local video replay for Relay React Native",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -31,7 +31,7 @@
31
31
  "prepack": "npm run stage-native && npm run build"
32
32
  },
33
33
  "peerDependencies": {
34
- "@feedbackrelay/react-native": "^0.1.0",
34
+ "@feedbackrelay/react-native": "^0.1.1",
35
35
  "react": "^19.2.3",
36
36
  "react-native": ">=0.86.3 <0.87"
37
37
  },