Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .codex/skills/run-headless-simulator/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,4 @@ Noise suppression:
- `none`
- `hyper-voice`

Cloudflare participants run with `none` only.

Run `just dev --logging info headless --help` or `hyper-client-simulator headless --help` if a flag fails.
423 changes: 137 additions & 286 deletions browser/src/participant/cloudflare/mod.rs

Large diffs are not rendered by default.

15 changes: 13 additions & 2 deletions browser/tests/cloudflare_driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ async fn cloudflare_runtime_delegates_hyper_core_authentication_to_the_worker()
"videoActivated": true,
"screenshareActivated": false,
"autoGainControl": true,
"noiseSuppression": "none",
"noiseSuppression": "hyper-voice",
"transportMode": "webrtc",
"videoConstraintPublishWebcam": "1080p",
"videoConstraintSubscribe": "none",
Expand Down Expand Up @@ -317,7 +317,7 @@ async fn cloudflare_runtime_delegates_hyper_core_authentication_to_the_worker()
assert!(started.joined);
assert_eq!(
started.noise_suppression,
client_simulator_config::NoiseSuppression::Disabled
client_simulator_config::NoiseSuppression::HyperVoice
);

participant.close().await;
Expand All @@ -331,6 +331,17 @@ async fn cloudflare_runtime_delegates_hyper_core_authentication_to_the_worker()
assert_eq!(requests[0].path, "/sessions");
assert!(request_json(&requests[0])["displayName"].is_string());
assert!(request_json(&requests[0]).get("hyperSessionCookie").is_none());
// A participant that leaves its settings to hyper.video leaves them out of the request.
let settings = &request_json(&requests[0])["settings"];
for key in [
"autoGainControl",
"blur",
"videoConstraintPublishWebcam",
"videoConstraintSubscribe",
"videoMaxConcurrentTracks",
] {
assert!(settings.get(key).is_none(), "{key}");
}
assert_eq!(requests[1].path, "/sessions/cf-runtime-core/commands");
assert_eq!(request_json(&requests[1]), json!({ "type": "leave" }));
assert_eq!(requests[2].path, "/sessions/cf-runtime-core/close");
Expand Down
2 changes: 1 addition & 1 deletion cloudflare-browser-simulator
10 changes: 4 additions & 6 deletions cloudflare-worker-client/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,6 @@ mod tests {
ParticipantSettings,
ParticipantSettingsNoiseSuppression,
ParticipantSettingsTransport,
ParticipantSettingsVideoConstraintPublishWebcam,
ParticipantSettingsVideoConstraintSubscribe,
SessionCreateRequest,
SessionCreateRequestDisplayName,
SessionCreateRequestFrontendKind,
Expand Down Expand Up @@ -364,13 +362,13 @@ mod tests {
session_timeout_ms: Some(600_000.0),
settings: ParticipantSettings {
audio_enabled: true,
auto_gain_control: true,
blur: false,
auto_gain_control: None,
blur: None,
noise_suppression: ParticipantSettingsNoiseSuppression::None,
screenshare_enabled: false,
transport: ParticipantSettingsTransport::Webrtc,
video_constraint_publish_webcam: ParticipantSettingsVideoConstraintPublishWebcam::None,
video_constraint_subscribe: ParticipantSettingsVideoConstraintSubscribe::None,
video_constraint_publish_webcam: None,
video_constraint_subscribe: None,
video_max_concurrent_tracks: None,
video_enabled: true,
},
Expand Down
1 change: 0 additions & 1 deletion docs/browser-driver.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ For parity with the current local backend, `start()` should apply those launch s

- Hyper Core applies noise suppression, blur, camera resolution, and transport before join, then applies audio/video in the lobby, and applies initial screenshare after joining. See [`browser/src/participant/local/core.rs`](../browser/src/participant/local/core.rs) `:143-171`.
- Hyper Lite currently only applies audio/video/screenshare and ignores advanced media settings. See [`browser/src/participant/local/lite.rs`](../browser/src/participant/local/lite.rs) `:90-106`, `:153-175`.
- The Cloudflare backend applies noise suppression `none` only, because the worker accepts no other value of hyper.video's setting. It sends `none` in place of `hyper-voice`, with a warning, and refuses `SetNoiseSuppression` with it. See [`browser/src/participant/cloudflare/mod.rs`](../browser/src/participant/cloudflare/mod.rs).

There is currently no runtime command for:

Expand Down
2 changes: 1 addition & 1 deletion src/headless.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pub struct HeadlessArgs {
#[clap(long = "auto-gain-control", value_name = "ON")]
pub auto_gain_control: Option<OwnOrDefault<bool>>,

/// Noise suppression model: none or hyper-voice. Cloudflare participants always run with none.
/// Noise suppression model: none or hyper-voice.
#[clap(long = "noise-suppression", value_name = "MODEL")]
pub noise_suppression: Option<NoiseSuppression>,

Expand Down
Loading