@linkshell/mac 0.1.3 → 0.1.4

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/README.md CHANGED
@@ -147,6 +147,7 @@ already, and stop if it is not rather than have the system ask.
147
147
  | `stream-check.mjs` | The stream for the host's socket: record format, rates, key frames, change of size, beside a video track; decoded by ffmpeg where installed, and by Chrome's WebCodecs unless `--no-chrome`. Part of `check`. |
148
148
  | `app-smoke.mjs` | Opens the app, asks for an offer, says what it holds. Part of `check`. |
149
149
  | `loopback.mjs` | The video track with no viewer: the app answers its own offer, and both ends' numbers are printed. Without `--fps`, at the app's own choice of frame rate; `--fps 30,60` holds each of those. `--narrow <bit/s>:<from second>:<for seconds>` holds the bandwidth estimate down for a while, prints every second, and says what each change of frame rate cost; `--timeline`, `--seconds 10`, `--motion`, `--still`, `--encoder own\|stock`, `--json <file>`; the rest in its header. |
150
+ | `flexfec-check.mjs` | A short functional check over its own loopback UDP proxy: 60 ms each way, every twentieth original video packet dropped. Checks real FlexFEC packet receipt, then successful video without FlexFEC when the test receiver declines it. `--json <file>` saves the evidence. No system network changes or latency claims. |
150
151
  | `setup-shots.mjs` | The setup window drawn into PNG files in every state, light and dark, Chinese and English (24 of them, in `build/setup-shots` or the directory named), with nothing shown and nothing asked of the system. For looking at the window after changing it. |
151
152
  | `app.mjs`, `h264.mjs`, `pointer-shapes.swift` | Shared by the above: opening the app, reading H.264, changing the pointer's picture. |
152
153
 
@@ -168,9 +169,12 @@ The host's own tests run its real code against this app: `packages/host/test/app
168
169
  | `--clock` | Shows the clock strip on a display while it is sent (see Measuring). `status` gains `clock`. |
169
170
  | `--motion` | Shows a window of scrolling text and a sliding block on a display while it is sent: a busy screen's work for the encoder, the same every run. |
170
171
  | `--loopback` | Each `rtc.open` is answered inside the app by a second connection that decodes the track. Adds `rtc.loopback*` (below). |
171
- | `--encoder own\|stock` | The video track's H.264 encoder: the app's low-latency one (`LowLatencyEncoder.swift`), or libwebrtc's VideoToolbox encoder with the level fixed (`Encoders.swift`). Default `stock`. |
172
+ | `--encoder own\|stock` | The video track's H.264 encoder: the app's low-latency one (`LowLatencyEncoder.swift`), or libwebrtc's VideoToolbox encoder with the level fixed (`Encoders.swift`). Default `own`; initialization or encoding failures switch to stock for the rest of that encoder's lifetime. |
172
173
  | `--no-low-latency` | Never asks VideoToolbox for the low-latency rate control: encodes as a Mac without it does. |
173
174
  | `--no-playout-delay` | Leaves out the field trial that sends playout-delay 0. |
175
+ | `--no-flexfec` | Disables FlexFEC advertisement and sending for an explicit comparison. |
176
+ | `--loopback-no-flexfec` | Makes the test receiver decline FlexFEC through codec preferences, to check an unsupported viewer's path. |
177
+ | `--loopback-network` | Only with `--loopback`: passes its ICE candidates to `flexfec-check.mjs`, which supplies proxy candidates. The proxy exists only while that tool runs. |
174
178
  | `--trial <name>=<value>` | Another libwebrtc field trial (repeatable). |
175
179
  | `--rtc-log` | libwebrtc's log, as `log` messages. |
176
180
 
@@ -247,15 +251,42 @@ be made`, `the video could not be added`, `no offer: …`, `the offer was not se
247
251
  The picture has no pointer in it; the viewer draws one from `cursor` and `shape`. A failed
248
252
  connection does not end the session: the host closes it.
249
253
 
254
+ `rtc.stats.flexfec` reports SDP evidence: `{state, payloadType, mediaSSRC, repairSSRC}`. The
255
+ state is `not-offered`, `awaiting-answer`, `declined`, `missing-ssrc` or `negotiated`. The last
256
+ means the answer accepted the codec and the offer has an FEC-FR protection group; it does not
257
+ claim that protection packets have been needed or that a loss was repaired.
258
+
250
259
  With `--loopback`: `← {t:"rtc.loopback", v, …}` once a second (the receiving end's numbers,
251
260
  among them `gapMs`, the longest it went without a decoded frame, and with `--clock` `latency`
252
- `{n, min, p50, p95, max}`: glass to decoded, ms),
261
+ `{n, min, p50, p95, max}`: glass to decoded, ms). `fecPacketsReceived` and `fecBytesReceived`
262
+ are the receiver's protection counters (`null` when unavailable), not recovery counts.
263
+ The test control messages are
253
264
  `→ {t:"rtc.loopback.limit", v, bitrate?}` to hold the sender's bandwidth estimate to so many
254
265
  bits a second, as a narrow network does (without its loss and delay), or without `bitrate` to
255
266
  let it go,
256
267
  `← {t:"rtc.loopback.channel", v, channel}` when a channel opens there,
257
268
  `→ {t:"rtc.loopback.send", v, channel, events:[…]}` to send messages up one, and
258
269
  `← {t:"rtc.loopback.heard", v, channel, bytes, message}` for each that came down one.
270
+ With `--loopback-network`, `↔ {t:"rtc.loopback.ice", v, candidate, sdpMid, sdpMLineIndex}`
271
+ exchanges the test receiver's ICE candidates with the tool. Normal viewers never use it.
272
+
273
+ **FlexFEC.** M154 needs both `WebRTC-FlexFEC-03-Advertised=Enabled` (send codec) and
274
+ `WebRTC-FlexFEC-03=Enabled` (protection SSRC and sending). They are on by default. Codec
275
+ preferences retain `flexfec-03`; libwebrtc negotiates it normally and produces the FEC-FR
276
+ group for our single video stream. A viewer which declines it continues with H.264 and
277
+ NACK/RTX. There is no SDP rewriting to pretend a viewer supports it. See M154's
278
+ [video engine](https://webrtc.googlesource.com/src/+/refs/branch-heads/8037/media/engine/webrtc_video_engine.cc),
279
+ [stream negotiation](https://webrtc.googlesource.com/src/+/refs/branch-heads/8037/pc/media_session.cc), and
280
+ [FEC sender creation](https://webrtc.googlesource.com/src/+/refs/branch-heads/8037/call/rtp_video_sender.cc).
281
+
282
+ Upstream [M124](https://webrtc.googlesource.com/src/+/refs/branch-heads/6367/media/engine/webrtc_video_engine.cc)
283
+ already exposes FlexFEC receive support unless explicitly disabled; the installed Jitsi build
284
+ and WKWebView still have to prove their capability in their actual answers. A clean network
285
+ can negotiate FlexFEC and send no repair packets, because M154's protection controller uses
286
+ loss and RTT to choose redundancy. The advertised `repair-window=10000000` is a required
287
+ format parameter which this upstream implementation does not use as a ten-second playback
288
+ wait. `flexfec-check.mjs` checks actual packet receipt under injected loss; it does not measure
289
+ real-device recovery, visual stalls or latency. Those remain phone acceptance checks.
259
290
 
260
291
  ### The data channels
261
292
 
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linkshell/mac",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "LinkShell.app: the Mac side of the screen — capture, encoding, WebRTC and input, under the app's own permissions.",
5
5
  "license": "MIT",
6
6
  "repository": {