replicas-computer 0.3.20 → 0.3.22

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
@@ -33,7 +33,7 @@ Every video byte for a WebRTC viewer passes through `PacedSender`. libdatachanne
33
33
 
34
34
  The superfast preset uses integer-pixel motion search to reduce encoder CPU while retaining CABAC compression; ultrafast is unchanged. Encoding uses at most four threads and one queued capture frame and skips rapid catch-up captures after CPU stalls. Native capture sends no periodic keyframes or refresh wave: an IDR follows within a frame when a viewer joins, a receiver sends PLI, a send queue is cut, the viewer's watchdog sees no video, or a socket viewer whose frames were withheld has drained its backlog or reset its decoder. Requests within a round trip of the last keyframe share it. Browsers join only at an IDR, so the SPS that intra refresh puts before a recovery point is not treated as a keyframe. Rung and standby changes are applied in place; a change of H.264 profile, chroma or preset starts a replacement, which discards two initial frames, emits a forced keyframe and then takes over. Until then the outgoing encoder takes the new rate, and keyframe requests wait for the replacement's. The FFmpeg fallback cannot be told to make a keyframe, so it keeps periodic intra refresh for WebRTC viewers, switches to 250 ms IDR intervals for socket viewers, and makes requested keyframes by replacement. Every new encoder has four seconds to produce joinable media. Native startup or replacement failures switch subsequent launches to FFmpeg; the active encoder continues until its replacement is ready.
35
35
 
36
- The viewer exposes `?view=fit|native|pixel` (letterboxed, one source pixel per CSS pixel, one source pixel per device pixel) and `?diagnostics=1`, which shows transport and ICE route, negotiated codec profile, source/decoded/CSS/device dimensions, displayed and decoded frame rates, bitrate, RTT, loss, jitter buffer, the server's encoder settings, keyframe interval, CPU, pacer budget, queue, stale cuts, repairs and copies, the socket fallback's unsent bytes, withheld delta frames and decoder resets, and the latest server and viewer events. `globalThis.__replicasDesktop` carries the same state for tooling.
36
+ The viewer exposes `?view=fit|native|pixel` (letterboxed, one source pixel per CSS pixel, one source pixel per device pixel), `?audio=0`, which keeps it silent for previews that can't be clicked, and `?diagnostics=1`, which shows transport and ICE route, negotiated codec profile, source/decoded/CSS/device dimensions, displayed and decoded frame rates, bitrate, RTT, loss, jitter buffer, the server's encoder settings, keyframe interval, CPU, pacer budget, queue, stale cuts, repairs and copies, the socket fallback's unsent bytes, withheld delta frames and decoder resets, and the latest server and viewer events. `globalThis.__replicasDesktop` carries the same state for tooling.
37
37
 
38
38
  WebRTC receiver timings use one-second counter differences: `decodeMs` is decode time per decoded frame; `receiverProcessingMs` runs from the first received packet to the decoded frame and already includes buffering and decoding. Neither measures physical display latency. Unsupported counters, counter resets and windows without decoded frames leave these fields absent. The timings appear in diagnostics, `__replicasDesktop` and per-viewer telemetry. See the [WebRTC stats definitions](https://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-totalprocessingdelay).
39
39
 
package/dist/index.js CHANGED
@@ -2932,7 +2932,7 @@ async function computerStatusCommand() {
2932
2932
  }
2933
2933
 
2934
2934
  // src/version.ts
2935
- var COMPUTER_USE_VERSION = "0.3.20";
2935
+ var COMPUTER_USE_VERSION = "0.3.22";
2936
2936
  var COMPUTER_USE_PROTOCOL_VERSION = 1;
2937
2937
 
2938
2938
  // src/program.ts
@@ -5427,8 +5427,6 @@ async function runMediaServer() {
5427
5427
  `${display}.0`,
5428
5428
  "-frames:v",
5429
5429
  "1",
5430
- "-vf",
5431
- "scale=768:-2",
5432
5430
  "-q:v",
5433
5431
  "4",
5434
5432
  "-f",
@@ -95,6 +95,7 @@ if (!screen || !status || !statusText || !audioPrompt || !diagnostics) throw new
95
95
  var params = new URLSearchParams(location.search);
96
96
  var request = parseStreamRequest(params);
97
97
  var showDiagnostics = params.get("diagnostics") === "1";
98
+ var audio = params.get("audio") !== "0";
98
99
  var view = params.get("view") === "native" ? "native" : params.get("view") === "pixel" ? "pixel" : "fit";
99
100
  document.documentElement.dataset.view = view;
100
101
  diagnostics.classList.toggle("visible", showDiagnostics);
@@ -468,6 +469,7 @@ var handleBinary = (data) => {
468
469
  }
469
470
  };
470
471
  var unlockAudio = () => {
472
+ if (!audio) return;
471
473
  if (transport !== "webrtc") {
472
474
  enableAudio().catch(() => {
473
475
  audioPrompt.hidden = false;
@@ -1108,7 +1110,7 @@ var reportWebRtcStats = async (pc, stats) => {
1108
1110
  if (peer !== pc || stats.sequence !== void 0 && stats.sequence <= reportedStatsSequence) return;
1109
1111
  reportedStatsSequence = stats.sequence ?? reportedStatsSequence;
1110
1112
  const video = entries.find(inboundOf("video"));
1111
- const audio = entries.find(inboundOf("audio"));
1113
+ const audio2 = entries.find(inboundOf("audio"));
1112
1114
  const transportStats = entries.find((stat) => stat.type === "transport");
1113
1115
  const pair = entries.find((stat) => stat.type === "candidate-pair" && stat.id === transportStats?.selectedCandidatePairId);
1114
1116
  const candidate = (id) => entries.find((stat) => stat.id === id);
@@ -1136,7 +1138,7 @@ var reportWebRtcStats = async (pc, stats) => {
1136
1138
  freezeCount: video?.freezeCount ?? 0,
1137
1139
  jitterBufferDelay: video?.jitterBufferDelay ?? 0,
1138
1140
  jitterBufferEmittedCount: video?.jitterBufferEmittedCount ?? 0,
1139
- audioPackets: audio?.packetsReceived ?? 0
1141
+ audioPackets: audio2?.packetsReceived ?? 0
1140
1142
  };
1141
1143
  if (counters.framesDecoded > (inbound?.framesDecoded ?? 0)) {
1142
1144
  lastFrameAt = now;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-computer",
3
- "version": "0.3.20",
3
+ "version": "0.3.22",
4
4
  "description": "Replicas workspace computer-use runtime",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",