Add native self-hosted instance connection to fluxer_desktop

Trimmed monorepo checkout (fluxer_desktop + packages/voice_engine_v2 +
tools/ci) with a "Connect to a Different Server" menu item and popout
that lets the desktop app switch to any self-hosted Fluxer instance,
plus fixes for well-known discovery on single-domain self-hosted
deployments and a false-positive ERR_ABORTED on same-origin client
redirects during the switch. Defaults to chat.fluxr.chat and uses an
isolated userData directory from the official build.
This commit is contained in:
2026-07-01 18:22:43 -04:00
commit 682afacd30
1763 changed files with 613720 additions and 0 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,61 @@
{
"name": "camera_in_place_update",
"events": [
{
"type": "connection.connectRequested",
"options": {"url": "wss://voice.example.test", "token": "token-camera"}
},
{"type": "connection.connectSucceeded", "operationId": 1},
{
"type": "camera.publishRequested",
"options": {"deviceId": "camera-1", "width": 1280, "height": 720, "mirror": false}
},
{"type": "camera.publishSucceeded", "operationId": 2},
{
"type": "camera.updateEncodingRequested",
"options": {
"width": 1920,
"height": 1080,
"frameRate": 60,
"mirror": true,
"backgroundMode": "blur",
"backgroundBlurStrength": 60
}
},
{"type": "camera.updateEncodingSucceeded", "operationId": 3}
],
"expectedCommands": [
{
"type": "connection.connect",
"operationId": 1,
"options": {"url": "wss://voice.example.test", "token": "token-camera"}
},
{
"type": "camera.publish",
"operationId": 2,
"options": {"deviceId": "camera-1", "width": 1280, "height": 720, "mirror": false}
},
{
"type": "camera.updateEncoding",
"operationId": 3,
"options": {
"width": 1920,
"height": 1080,
"frameRate": 60,
"mirror": true,
"backgroundMode": "blur",
"backgroundBlurStrength": 60
}
}
],
"expected": {
"nextOperationId": 4,
"cameraStatus": "published",
"cameraDeviceId": "camera-1",
"cameraWidth": 1920,
"cameraFrameRate": 60,
"cameraMirror": true,
"cameraBackgroundMode": "blur",
"lastFailureCode": null
}
}
@@ -0,0 +1,48 @@
{
"name": "capabilities_lifecycle",
"events": [
{
"type": "capabilities.changed",
"capabilities": {
"connect": true,
"microphone": true,
"camera": true,
"screen": true,
"screenAudio": true,
"outputDevice": true,
"participantVolume": true,
"remoteTrackSubscription": true,
"dataChannel": true,
"stats": true,
"nativeVideoFrames": true,
"hardwareEncoding": true,
"zeroCopyScreenTransport": true,
"nativeAudioTaps": true
}
},
{"type": "capabilities.hardwareEncoderQueryRequested"},
{
"type": "capabilities.hardwareEncoderChanged",
"operationId": 1,
"capabilities": {
"available": true,
"backend": "nvenc",
"compiled": true,
"runtime": true,
"codecs": ["h264", "hevc"],
"zeroCopy": true,
"nativeInputs": ["d3d11-texture"]
}
}
],
"expectedCommands": [[], [{"type": "capabilities.queryHardwareEncoder", "operationId": 1}], []],
"expected": {
"nextOperationId": 2,
"hardwareEncoderOperationId": null,
"hardwareEncoderFailureCode": null,
"hardwareEncoderBackend": "nvenc",
"hasZeroCopyNativeInput": true,
"hasNativeNvencH264": true,
"hasNativeNvencH265": true
}
}
@@ -0,0 +1,93 @@
{
"name": "codec_republish",
"events": [
{
"type": "connection.connectRequested",
"options": {
"url": "wss://voice.example.test",
"token": "token-codec"
}
},
{
"type": "connection.connectSucceeded",
"operationId": 1
},
{
"type": "screen.publishRequested",
"options": {
"captureId": "capture-screen-1",
"width": 1920,
"height": 1080,
"codec": "h264",
"hardwareEncoding": true,
"zeroCopyRequired": true,
"maxFramerate": 60
}
},
{
"type": "screen.publishSucceeded",
"operationId": 2
},
{
"type": "screen.updateEncodingRequested",
"options": {
"captureId": "capture-screen-1",
"width": 1920,
"height": 1080,
"codec": "h265",
"hardwareEncoding": true,
"zeroCopyRequired": true,
"frameRate": 60
}
},
{
"type": "screen.publishSucceeded",
"operationId": 3
}
],
"expectedCommands": [
{
"type": "connection.connect",
"operationId": 1,
"options": {
"url": "wss://voice.example.test",
"token": "token-codec"
}
},
{
"type": "screen.publish",
"operationId": 2,
"options": {
"captureId": "capture-screen-1",
"width": 1920,
"height": 1080,
"codec": "h264",
"hardwareEncoding": true,
"zeroCopyRequired": true,
"maxFramerate": 60
}
},
{
"type": "screen.publish",
"operationId": 3,
"options": {
"captureId": "capture-screen-1",
"width": 1920,
"height": 1080,
"codec": "h265",
"hardwareEncoding": true,
"zeroCopyRequired": true,
"maxFramerate": 60
}
}
],
"expected": {
"nextOperationId": 4,
"screenStatus": "published",
"screenCaptureId": "capture-screen-1",
"screenCodec": "h265",
"screenHardwareEncoding": true,
"screenZeroCopyRequired": true,
"lastFailureCode": null
}
}
@@ -0,0 +1,61 @@
{
"name": "audio input selection and hotplug republish microphone when connected",
"events": [
{"type": "connection.connectRequested", "options": {"url": "wss://voice", "token": "token"}},
{"type": "connection.connectSucceeded", "operationId": 1},
{"type": "microphone.publishRequested", "options": {"deviceId": "mic-a"}},
{"type": "microphone.publishSucceeded", "operationId": 2},
{"type": "devices.selectAudioInputRequested", "deviceId": "mic-b"},
{"type": "command.succeeded", "operationId": 3, "commandType": "devices.selectAudioInput"},
{"type": "microphone.publishSucceeded", "operationId": 4},
{
"type": "devices.changed",
"operationId": null,
"reason": "hotplug",
"devices": {
"audioInputs": [
{"deviceId": "mic-b", "label": "Desk mic", "isDefault": false},
{"deviceId": "mic-c", "label": "Headset mic", "isDefault": true}
],
"audioOutputs": [],
"cameras": [],
"selectedAudioInputId": "mic-c",
"selectedAudioOutputId": null,
"selectedCameraId": null
}
},
{"type": "microphone.publishSucceeded", "operationId": 5}
],
"expectedCommands": [
{"type": "connection.connect", "operationId": 1, "options": {"url": "wss://voice", "token": "token"}},
{"type": "microphone.publish", "operationId": 2, "options": {"deviceId": "mic-a"}},
{"type": "devices.selectAudioInput", "operationId": 3, "deviceId": "mic-b"},
{"type": "microphone.publish", "operationId": 4, "options": {"deviceId": "mic-b"}},
{"type": "microphone.publish", "operationId": 5, "options": {"deviceId": "mic-c"}}
],
"checkpoints": [
{
"afterEvent": 5,
"microphoneStatus": "publishing",
"desiredDeviceId": "mic-b",
"selectedAudioInputId": "mic-b"
},
{
"afterEvent": 8,
"microphoneStatus": "publishing",
"desiredDeviceId": "mic-c",
"selectedAudioInputId": "mic-c"
}
],
"expectedSnapshot": {
"nextOperationId": 6,
"connectionStatus": "connected",
"microphoneStatus": "published",
"microphoneEnabled": true,
"localSpeakingOverride": null,
"publishedDeviceId": "mic-c",
"desiredDeviceId": "mic-c",
"selectedAudioInputId": "mic-c",
"lastFailureCode": null
}
}
@@ -0,0 +1,77 @@
{
"name": "device_inventory",
"events": [
{"type": "devices.enumerateRequested"},
{
"type": "devices.changed",
"operationId": 1,
"reason": "initial",
"devices": {
"audioInputs": [
{"deviceId": "mic-1", "label": "Built-in Microphone", "isDefault": true, "role": "default"},
{
"deviceId": "mic-2",
"label": "USB Microphone",
"isDefault": false,
"role": "communications",
"endpointLabel": "USB Audio",
"isDefaultRoute": true
}
],
"audioOutputs": [{"deviceId": "speaker-1", "label": "Built-in Speakers", "isDefault": true, "role": "default"}],
"cameras": [{"deviceId": "camera-1", "label": "FaceTime Camera", "description": "Integrated camera"}],
"selectedAudioInputId": "mic-1",
"selectedAudioOutputId": "speaker-1",
"selectedCameraId": "camera-1"
}
},
{"type": "devices.selectAudioInputRequested", "deviceId": "mic-2"},
{"type": "command.succeeded", "operationId": 2, "commandType": "devices.selectAudioInput"},
{
"type": "devices.changed",
"operationId": null,
"reason": "hotplug",
"devices": {
"audioInputs": [
{
"deviceId": "mic-2",
"label": "USB Microphone",
"isDefault": true,
"role": "communications",
"endpointLabel": "USB Audio",
"isDefaultRoute": true
}
],
"audioOutputs": [
{"deviceId": "speaker-1", "label": "Built-in Speakers", "isDefault": true, "role": "default"},
{"deviceId": "headset-1", "label": "USB Headset", "isDefault": false, "role": "endpoint"}
],
"cameras": [
{"deviceId": "camera-1", "label": "FaceTime Camera", "description": "Integrated camera"},
{"deviceId": "camera-2", "label": "Capture Card", "description": "USB capture"}
],
"selectedAudioInputId": "mic-2",
"selectedAudioOutputId": "speaker-1",
"selectedCameraId": "camera-1"
}
}
],
"expectedCommands": [
[{"type": "devices.enumerate", "operationId": 1}],
[],
[{"type": "devices.selectAudioInput", "operationId": 2, "deviceId": "mic-2"}],
[],
[]
],
"expected": {
"nextOperationId": 3,
"deviceOperationId": null,
"failureCode": null,
"selectedAudioInputId": "mic-2",
"selectedAudioInputLabel": "USB Microphone",
"selectedAudioInputRole": "communications",
"audioOutputCount": 2,
"cameraCount": 2,
"operationStatuses": {"1": "succeeded", "2": "succeeded"}
}
}
@@ -0,0 +1,51 @@
{
"name": "diagnostics_lifecycle",
"events": [
{
"type": "diagnostics.logRequested",
"entry": {
"id": "diag-1",
"atMs": 1000,
"level": "info",
"code": "voice.session.started",
"message": "Voice session started"
}
},
{"type": "command.succeeded", "operationId": 1, "commandType": "diagnostics.log"},
{
"type": "diagnostics.logged",
"operationId": null,
"entry": {
"id": "diag-2",
"atMs": 1010,
"level": "warn",
"code": "voice.stats.delayed",
"message": "Stats collection was delayed",
"detail": {"delayMs": 250}
}
}
],
"expectedCommands": [
[
{
"type": "diagnostics.log",
"operationId": 1,
"entry": {
"id": "diag-1",
"atMs": 1000,
"level": "info",
"code": "voice.session.started",
"message": "Voice session started"
}
}
],
[],
[]
],
"expected": {
"nextOperationId": 2,
"entryIds": ["diag-1", "diag-2"],
"lastCode": "voice.stats.delayed",
"operationStatuses": {"1": "succeeded"}
}
}
@@ -0,0 +1,34 @@
{
"name": "e2ee_lifecycle",
"events": [
{"type": "e2ee.setEnabledRequested", "enabled": true, "keyId": "key-a"},
{"type": "e2ee.setEnabledRequested", "enabled": false},
{"type": "e2ee.enabled", "operationId": 1, "keyId": "key-a"},
{"type": "e2ee.disabled", "operationId": 2},
{"type": "e2ee.enabled", "operationId": null, "keyId": "key-b"},
{
"type": "e2ee.failed",
"operationId": null,
"error": {
"code": "implementationError",
"message": "Remote participant key material could not be applied",
"capability": "e2ee"
}
}
],
"expectedCommands": [
[{"type": "e2ee.setEnabled", "operationId": 1, "enabled": true, "keyId": "key-a"}],
[{"type": "e2ee.setEnabled", "operationId": 2, "enabled": false}],
[],
[],
[],
[]
],
"expected": {
"nextOperationId": 3,
"status": "failed",
"keyId": "key-b",
"operationId": null,
"failureCode": "implementationError"
}
}
@@ -0,0 +1,97 @@
{
"name": "gateway_connection",
"description": "Join writes gateway voice state, observes gateway state, then connects the media session.",
"steps": [
{
"name": "request gateway join",
"event": {
"type": "gateway.voiceStateWriteRequested",
"options": {
"guildId": "guild-1",
"channelId": "channel-1",
"selfMute": false,
"selfDeaf": false
}
},
"commands": [
{
"type": "gateway.voiceState.write",
"operationId": 1,
"options": {
"guildId": "guild-1",
"channelId": "channel-1",
"selfMute": false,
"selfDeaf": false
}
}
]
},
{
"name": "gateway join write succeeds",
"event": {
"type": "gateway.voiceStateWriteSucceeded",
"operationId": 1
},
"commands": []
},
{
"name": "gateway voice state arrives",
"event": {
"type": "gateway.voiceStateUpdated",
"voiceState": {
"guildId": "guild-1",
"channelId": "channel-1",
"userId": "user-1",
"sessionId": "session-1",
"selfMute": false,
"selfDeaf": false,
"selfVideo": false,
"selfStream": false,
"suppress": false,
"requestToSpeakTimestamp": null
}
},
"commands": []
},
{
"name": "request media connection",
"event": {
"type": "connection.connectRequested",
"options": {
"url": "wss://voice-one.example.test",
"token": "token-1"
}
},
"commands": [
{
"type": "connection.connect",
"operationId": 2,
"options": {
"url": "wss://voice-one.example.test",
"token": "token-1"
}
}
]
},
{
"name": "media connection succeeds",
"event": {
"type": "connection.connectSucceeded",
"operationId": 2
},
"commands": []
}
],
"expected": {
"nextOperationId": 3,
"connectionStatus": "connected",
"activeUrl": "wss://voice-one.example.test",
"desiredUrl": "wss://voice-one.example.test",
"gatewayChannelId": "channel-1",
"lifecycleTearingDown": false,
"operationStatuses": {
"1": "succeeded",
"2": "succeeded"
}
}
}
@@ -0,0 +1,81 @@
{
"name": "inbound video frame stats projection",
"events": [
{
"type": "inboundVideo.trackSubscribed",
"track": {
"participantSid": "PA_alice",
"participantIdentity": "alice",
"trackSid": "TR_screen",
"source": "screen"
}
},
{
"type": "inboundVideo.frameReceived",
"frame": {
"participantSid": "PA_alice",
"participantIdentity": "alice",
"trackSid": "TR_screen",
"width": 640,
"height": 360,
"timestampUs": 1000,
"byteLength": 345600
}
},
{
"type": "inboundVideo.frameStats",
"stats": {
"participantSid": "PA_alice",
"participantIdentity": "alice",
"trackSid": "TR_screen",
"width": 1280,
"height": 720,
"frameCount": 31,
"lastFrameTimestampUs": 1033000,
"lastFrameByteLength": 1382400
}
},
{
"type": "inboundVideo.frameStats",
"stats": {
"participantSid": "PA_alice",
"participantIdentity": "alice",
"trackSid": "TR_screen",
"width": 1280,
"height": 720,
"frameCount": 61,
"lastFrameTimestampUs": 2033000,
"lastFrameByteLength": 1382400
}
},
{
"type": "inboundVideo.frameStats",
"stats": {
"participantSid": "PA_bob",
"trackSid": "TR_unknown",
"width": 320,
"height": 180,
"frameCount": 5,
"lastFrameTimestampUs": 3000000,
"lastFrameByteLength": 86400
}
}
],
"expected": {
"inboundVideoTracks": [
{
"participantSid": "PA_alice",
"participantIdentity": "alice",
"trackSid": "TR_screen",
"source": "screen",
"width": 1280,
"height": 720,
"frameCount": 61,
"lastFrameTimestampUs": 2033000,
"lastFrameByteLength": 1382400
}
],
"droppedFrameCount": 1,
"commands": []
}
}
@@ -0,0 +1,66 @@
{
"name": "inbound native video frame projection",
"events": [
{
"type": "inboundVideo.trackSubscribed",
"track": {
"participantSid": "PA_alice",
"participantIdentity": "alice",
"trackSid": "TR_screen",
"source": "screen"
}
},
{
"type": "inboundVideo.frameReceived",
"frame": {
"participantSid": "PA_alice",
"participantIdentity": "alice",
"trackSid": "TR_screen",
"width": 640,
"height": 360,
"timestampUs": 1000,
"byteLength": 345600
}
},
{
"type": "inboundVideo.frameReceived",
"frame": {
"participantSid": "PA_alice",
"participantIdentity": "alice",
"trackSid": "TR_screen",
"width": 1280,
"height": 720,
"timestampUs": 2000,
"byteLength": 1382400
}
},
{
"type": "inboundVideo.frameReceived",
"frame": {
"participantSid": "PA_alice",
"trackSid": "TR_unknown",
"width": 320,
"height": 180,
"timestampUs": 3000,
"byteLength": 86400
}
}
],
"expected": {
"inboundVideoTracks": [
{
"participantSid": "PA_alice",
"participantIdentity": "alice",
"trackSid": "TR_screen",
"source": "screen",
"width": 1280,
"height": 720,
"frameCount": 2,
"lastFrameTimestampUs": 2000,
"lastFrameByteLength": 1382400
}
],
"droppedFrameCount": 1,
"commands": []
}
}
@@ -0,0 +1,82 @@
{
"name": "local media mute unmute deafen undeafen and microphone publish lifecycle",
"events": [
{"type": "connection.connectRequested", "options": {"url": "wss://voice", "token": "token"}},
{"type": "connection.connectSucceeded", "operationId": 1},
{"type": "microphone.publishRequested", "options": {"deviceId": "mic-a"}},
{"type": "microphone.publishSucceeded", "operationId": 2},
{"type": "connection.reconnectRequested"},
{"type": "connection.disconnectSucceeded", "operationId": 3},
{"type": "connection.connectSucceeded", "operationId": 4},
{"type": "microphone.publishSucceeded", "operationId": 5},
{"type": "localAudio.muteRequested", "muted": true},
{"type": "microphone.setEnabledSucceeded", "operationId": 6},
{"type": "localAudio.muteRequested", "muted": false},
{"type": "microphone.setEnabledSucceeded", "operationId": 7},
{"type": "localAudio.deafenRequested", "deafened": true},
{"type": "microphone.setEnabledSucceeded", "operationId": 8},
{"type": "localAudio.deafenRequested", "deafened": false},
{"type": "microphone.setEnabledSucceeded", "operationId": 9},
{"type": "microphone.unpublishRequested"},
{"type": "microphone.unpublishSucceeded", "operationId": 10}
],
"expectedCommands": [
{"type": "connection.connect", "operationId": 1, "options": {"url": "wss://voice", "token": "token"}},
{"type": "microphone.publish", "operationId": 2, "options": {"deviceId": "mic-a"}},
{"type": "connection.disconnect", "operationId": 3, "reason": "network"},
{"type": "connection.connect", "operationId": 4, "options": {"url": "wss://voice", "token": "token"}},
{"type": "microphone.publish", "operationId": 5, "options": {"deviceId": "mic-a"}},
{"type": "microphone.setEnabled", "operationId": 6, "enabled": false},
{"type": "microphone.setEnabled", "operationId": 7, "enabled": true},
{"type": "microphone.setEnabled", "operationId": 8, "enabled": false},
{"type": "microphone.setEnabled", "operationId": 9, "enabled": true},
{"type": "microphone.unpublish", "operationId": 10}
],
"checkpoints": [
{
"afterEvent": 5,
"connectionStatus": "reconnecting",
"microphoneStatus": "idle",
"desiredDeviceId": "mic-a",
"publishedDeviceId": null
},
{
"afterEvent": 9,
"microphoneStatus": "published",
"microphoneEnabled": false,
"localSpeakingOverride": false,
"locallyMuted": true,
"locallyDeafened": false
},
{
"afterEvent": 13,
"microphoneStatus": "published",
"microphoneEnabled": false,
"localSpeakingOverride": false,
"locallyMuted": true,
"locallyDeafened": true,
"shouldUnmuteOnUndeafen": true
},
{
"afterEvent": 15,
"microphoneStatus": "published",
"microphoneEnabled": true,
"localSpeakingOverride": null,
"locallyMuted": false,
"locallyDeafened": false
}
],
"expectedSnapshot": {
"nextOperationId": 11,
"connectionStatus": "connected",
"microphoneStatus": "idle",
"microphoneEnabled": true,
"localSpeakingOverride": false,
"locallyMuted": false,
"locallyDeafened": false,
"mutedByPermission": false,
"publishedDeviceId": null,
"desiredDeviceId": null,
"lastFailureCode": null
}
}
@@ -0,0 +1,58 @@
{
"name": "microphone device failure mutes locally then device hotswap and unmute recover",
"events": [
{"type": "connection.connectRequested", "options": {"url": "wss://voice", "token": "token"}},
{"type": "connection.connectSucceeded", "operationId": 1},
{"type": "microphone.publishRequested", "options": {"deviceId": "mic-a"}},
{
"type": "microphone.publishFailed",
"operationId": 2,
"error": {"code": "deviceUnavailable", "message": "device unavailable", "capability": "microphoneCapture"}
},
{"type": "devices.selectAudioInputRequested", "deviceId": "mic-b"},
{"type": "command.succeeded", "operationId": 3, "commandType": "devices.selectAudioInput"},
{"type": "microphone.publishSucceeded", "operationId": 4},
{"type": "microphone.setEnabledSucceeded", "operationId": 5},
{"type": "localAudio.muteRequested", "muted": false},
{"type": "microphone.setEnabledSucceeded", "operationId": 6}
],
"expectedCommands": [
{"type": "connection.connect", "operationId": 1, "options": {"url": "wss://voice", "token": "token"}},
{"type": "microphone.publish", "operationId": 2, "options": {"deviceId": "mic-a"}},
{"type": "devices.selectAudioInput", "operationId": 3, "deviceId": "mic-b"},
{"type": "microphone.publish", "operationId": 4, "options": {"deviceId": "mic-b"}},
{"type": "microphone.setEnabled", "operationId": 5, "enabled": false},
{"type": "microphone.setEnabled", "operationId": 6, "enabled": true}
],
"checkpoints": [
{
"afterEvent": 4,
"microphoneStatus": "failed",
"microphoneEnabled": false,
"locallyMuted": true,
"preferredLocallyMuted": true,
"lastFailureCode": "deviceUnavailable"
},
{
"afterEvent": 7,
"microphoneStatus": "published",
"microphoneEnabled": false,
"localSpeakingOverride": false,
"publishedDeviceId": "mic-b",
"desiredDeviceId": "mic-b"
}
],
"expectedSnapshot": {
"nextOperationId": 7,
"connectionStatus": "connected",
"microphoneStatus": "published",
"microphoneEnabled": true,
"localSpeakingOverride": null,
"locallyMuted": false,
"preferredLocallyMuted": false,
"publishedDeviceId": "mic-b",
"desiredDeviceId": "mic-b",
"selectedAudioInputId": "mic-b",
"lastFailureCode": "deviceUnavailable"
}
}
@@ -0,0 +1,40 @@
{
"name": "native_frame_sink",
"events": [
{
"type": "nativeFrameSink.attachRequested",
"options": {
"sinkId": "sink-screen-1",
"captureId": "capture-native-1",
"trackSid": "TR_screen_1",
"zeroCopyRequired": true
}
},
{
"type": "nativeFrameSink.detachRequested",
"sinkId": "sink-screen-1"
}
],
"expectedCommands": [
{
"type": "nativeFrameSink.attach",
"operationId": 1,
"options": {
"sinkId": "sink-screen-1",
"captureId": "capture-native-1",
"trackSid": "TR_screen_1",
"zeroCopyRequired": true
}
},
{
"type": "nativeFrameSink.detach",
"operationId": 2,
"sinkId": "sink-screen-1"
}
],
"expected": {
"nextOperationId": 3,
"nativeFrameSinkCount": 0,
"lastFailureCode": null
}
}
@@ -0,0 +1,118 @@
{
"name": "native_zero_copy_screen",
"events": [
{
"type": "nativeCapture.startRequested",
"options": {
"captureId": "capture-native-1",
"source": {
"id": "display-1",
"kind": "screen",
"title": "Display 1",
"width": 2560,
"height": 1440,
"displayId": "display-1"
},
"width": 2560,
"height": 1440,
"frameRate": 60,
"includeCursor": true,
"includeAudio": false,
"zeroCopyRequired": true
}
},
{
"type": "nativeCapture.started",
"operationId": 1,
"captureId": "capture-native-1"
},
{
"type": "nativeCapture.updateRequested",
"options": {
"captureId": "capture-native-1",
"source": {
"id": "display-1",
"kind": "screen",
"title": "Display 1",
"width": 2560,
"height": 1440,
"displayId": "display-1"
},
"width": 1920,
"height": 1080,
"frameRate": 30,
"includeCursor": false,
"includeAudio": false,
"zeroCopyRequired": true
}
},
{
"type": "nativeCapture.started",
"operationId": 2,
"captureId": "capture-native-1"
},
{
"type": "nativeCapture.stopRequested",
"captureId": "capture-native-1"
},
{
"type": "nativeCapture.stopped",
"operationId": 3,
"captureId": "capture-native-1"
}
],
"expectedCommands": [
{
"type": "nativeCapture.start",
"operationId": 1,
"options": {
"captureId": "capture-native-1",
"source": {
"id": "display-1",
"kind": "screen",
"title": "Display 1",
"width": 2560,
"height": 1440,
"displayId": "display-1"
},
"width": 2560,
"height": 1440,
"frameRate": 60,
"includeCursor": true,
"includeAudio": false,
"zeroCopyRequired": true
}
},
{
"type": "nativeCapture.update",
"operationId": 2,
"options": {
"captureId": "capture-native-1",
"source": {
"id": "display-1",
"kind": "screen",
"title": "Display 1",
"width": 2560,
"height": 1440,
"displayId": "display-1"
},
"width": 1920,
"height": 1080,
"frameRate": 30,
"includeCursor": false,
"includeAudio": false,
"zeroCopyRequired": true
}
},
{
"type": "nativeCapture.stop",
"operationId": 3,
"captureId": "capture-native-1"
}
],
"expected": {
"nextOperationId": 4,
"nativeCaptureCount": 0,
"lastFailureCode": null
}
}
@@ -0,0 +1,46 @@
{
"name": "participants and tracks projection",
"events": [
{
"type": "room.participantJoined",
"participant": {"sid": "PA_alice", "identity": "alice", "name": "Alice"}
},
{
"type": "room.trackPublished",
"track": {
"participantIdentity": "alice",
"participantSid": "PA_alice",
"trackSid": "TR_camera",
"trackName": "camera",
"kind": "video",
"source": "camera",
"muted": false
}
},
{"type": "room.trackMuted", "trackSid": "TR_camera"},
{
"type": "room.trackPublished",
"track": {
"participantIdentity": "alice",
"participantSid": "PA_alice",
"trackSid": "TR_mic",
"trackName": "microphone",
"kind": "audio",
"source": "microphone",
"muted": false
}
},
{"type": "room.trackUnpublished", "trackSid": "TR_mic"},
{
"type": "room.participantJoined",
"participant": {"sid": "PA_bob", "identity": "bob", "name": "Bob"}
},
{"type": "room.participantLeft", "participantIdentity": "alice", "participantSid": "PA_alice"}
],
"expected": {
"participants": [{"sid": "PA_bob", "identity": "bob", "name": "Bob"}],
"tracks": [],
"inboundVideoTracks": [],
"commands": []
}
}
@@ -0,0 +1,61 @@
{
"name": "microphone permission denial mutes and grant restores requested unmute",
"events": [
{"type": "connection.connectRequested", "options": {"url": "wss://voice", "token": "token"}},
{"type": "connection.connectSucceeded", "operationId": 1},
{"type": "microphone.publishRequested", "options": {"deviceId": "mic-a"}},
{"type": "microphone.publishSucceeded", "operationId": 2},
{
"type": "permissions.result",
"operationId": null,
"result": {"name": "microphone", "status": "denied", "canPrompt": false}
},
{"type": "microphone.setEnabledSucceeded", "operationId": 3},
{"type": "localAudio.muteRequested", "muted": false},
{
"type": "permissions.result",
"operationId": null,
"result": {"name": "microphone", "status": "granted", "canPrompt": false}
},
{"type": "microphone.setEnabledSucceeded", "operationId": 4}
],
"expectedCommands": [
{"type": "connection.connect", "operationId": 1, "options": {"url": "wss://voice", "token": "token"}},
{"type": "microphone.publish", "operationId": 2, "options": {"deviceId": "mic-a"}},
{"type": "microphone.setEnabled", "operationId": 3, "enabled": false},
{"type": "microphone.setEnabled", "operationId": 4, "enabled": true}
],
"checkpoints": [
{
"afterEvent": 5,
"microphoneStatus": "published",
"microphoneEnabled": false,
"localSpeakingOverride": false,
"locallyMuted": true,
"mutedByPermission": true,
"permissionStatus": "denied"
},
{
"afterEvent": 7,
"microphoneStatus": "published",
"microphoneEnabled": false,
"locallyMuted": true,
"preferredLocallyMuted": false,
"mutedByPermission": true
}
],
"expectedSnapshot": {
"nextOperationId": 5,
"connectionStatus": "connected",
"microphoneStatus": "published",
"microphoneEnabled": true,
"localSpeakingOverride": null,
"locallyMuted": false,
"preferredLocallyMuted": false,
"mutedByPermission": false,
"permissionStatus": "granted",
"publishedDeviceId": "mic-a",
"desiredDeviceId": "mic-a",
"lastFailureCode": null
}
}
@@ -0,0 +1,62 @@
{
"name": "push to talk and push to mute gate microphone enabled state",
"events": [
{"type": "connection.connectRequested", "options": {"url": "wss://voice", "token": "token"}},
{"type": "connection.connectSucceeded", "operationId": 1},
{"type": "microphone.publishRequested", "options": {"deviceId": "mic-a"}},
{"type": "microphone.publishSucceeded", "operationId": 2},
{"type": "audioControls.changed", "controls": {"mode": "pushToTalk", "pushToTalkActive": false}},
{"type": "microphone.setEnabledSucceeded", "operationId": 3},
{"type": "audioControls.changed", "controls": {"pushToTalkActive": true}},
{"type": "microphone.setEnabledSucceeded", "operationId": 4},
{
"type": "audioControls.changed",
"controls": {"mode": "pushToMute", "pushToTalkActive": false, "pushToMuteActive": true}
},
{"type": "microphone.setEnabledSucceeded", "operationId": 5},
{"type": "audioControls.changed", "controls": {"pushToMuteActive": false}},
{"type": "microphone.setEnabledSucceeded", "operationId": 6}
],
"expectedCommands": [
{"type": "connection.connect", "operationId": 1, "options": {"url": "wss://voice", "token": "token"}},
{"type": "microphone.publish", "operationId": 2, "options": {"deviceId": "mic-a"}},
{"type": "microphone.setEnabled", "operationId": 3, "enabled": false},
{"type": "microphone.setEnabled", "operationId": 4, "enabled": true},
{"type": "microphone.setEnabled", "operationId": 5, "enabled": false},
{"type": "microphone.setEnabled", "operationId": 6, "enabled": true}
],
"checkpoints": [
{
"afterEvent": 5,
"microphoneStatus": "published",
"microphoneEnabled": false,
"localSpeakingOverride": false,
"audioMode": "pushToTalk"
},
{
"afterEvent": 7,
"microphoneStatus": "published",
"microphoneEnabled": true,
"localSpeakingOverride": true,
"audioMode": "pushToTalk"
},
{
"afterEvent": 9,
"microphoneStatus": "published",
"microphoneEnabled": false,
"localSpeakingOverride": false,
"audioMode": "pushToMute"
}
],
"expectedSnapshot": {
"nextOperationId": 7,
"connectionStatus": "connected",
"microphoneStatus": "published",
"microphoneEnabled": true,
"localSpeakingOverride": null,
"audioMode": "pushToMute",
"publishedDeviceId": "mic-a",
"desiredDeviceId": "mic-a",
"lastFailureCode": null
}
}
@@ -0,0 +1,160 @@
{
"name": "reconnect_channel_move",
"description": "A channel move writes the new gateway voice state, disconnects the old media session, then reconnects to the new room.",
"steps": [
{
"name": "connect first room",
"event": {
"type": "connection.connectRequested",
"options": {
"url": "wss://voice-one.example.test",
"token": "token-1"
}
},
"commands": [
{
"type": "connection.connect",
"operationId": 1,
"options": {
"url": "wss://voice-one.example.test",
"token": "token-1"
}
}
]
},
{
"name": "first room connected",
"event": {
"type": "connection.connectSucceeded",
"operationId": 1
},
"commands": []
},
{
"name": "old gateway channel observed",
"event": {
"type": "gateway.voiceStateUpdated",
"voiceState": {
"guildId": "guild-1",
"channelId": "channel-1",
"userId": "user-1",
"sessionId": "session-1",
"selfMute": false,
"selfDeaf": false,
"selfVideo": false,
"selfStream": false,
"suppress": false,
"requestToSpeakTimestamp": null
}
},
"commands": []
},
{
"name": "write moved gateway channel",
"event": {
"type": "gateway.voiceStateWriteRequested",
"options": {
"guildId": "guild-1",
"channelId": "channel-2",
"selfMute": false,
"selfDeaf": false
}
},
"commands": [
{
"type": "gateway.voiceState.write",
"operationId": 2,
"options": {
"guildId": "guild-1",
"channelId": "channel-2",
"selfMute": false,
"selfDeaf": false
}
}
]
},
{
"name": "moved gateway write succeeds",
"event": {
"type": "gateway.voiceStateWriteSucceeded",
"operationId": 2
},
"commands": []
},
{
"name": "new gateway channel observed",
"event": {
"type": "gateway.voiceStateUpdated",
"voiceState": {
"guildId": "guild-1",
"channelId": "channel-2",
"userId": "user-1",
"sessionId": "session-2",
"selfMute": false,
"selfDeaf": false,
"selfVideo": false,
"selfStream": false,
"suppress": false,
"requestToSpeakTimestamp": null
}
},
"commands": []
},
{
"name": "request second media connection",
"event": {
"type": "connection.connectRequested",
"options": {
"url": "wss://voice-two.example.test",
"token": "token-2"
}
},
"commands": [
{
"type": "connection.disconnect",
"operationId": 3,
"reason": "replaced"
}
]
},
{
"name": "old media connection disconnects",
"event": {
"type": "connection.disconnectSucceeded",
"operationId": 3
},
"commands": [
{
"type": "connection.connect",
"operationId": 4,
"options": {
"url": "wss://voice-two.example.test",
"token": "token-2"
}
}
]
},
{
"name": "second media connection succeeds",
"event": {
"type": "connection.connectSucceeded",
"operationId": 4
},
"commands": []
}
],
"expected": {
"nextOperationId": 5,
"connectionStatus": "connected",
"activeUrl": "wss://voice-two.example.test",
"desiredUrl": "wss://voice-two.example.test",
"gatewayChannelId": "channel-2",
"lifecycleTearingDown": false,
"operationStatuses": {
"1": "succeeded",
"2": "succeeded",
"3": "succeeded",
"4": "succeeded"
}
}
}
@@ -0,0 +1,48 @@
{
"name": "resume_preserves_media",
"steps": [
{
"name": "external establishment",
"event": {"type": "connection.externallyEstablished", "options": {"url": "wss://voice.fixture", "token": ""}},
"commands": []
},
{
"name": "camera publish requested",
"event": {"type": "camera.publishRequested", "options": {"deviceId": "camera-1"}},
"commands": [{"type": "camera.publish", "operationId": 1, "options": {"deviceId": "camera-1"}}]
},
{
"name": "camera publish succeeded",
"event": {"type": "camera.publishSucceeded", "operationId": 1},
"commands": []
},
{
"name": "resume re-establishes the same endpoint without replaying media",
"event": {"type": "connection.externallyEstablished", "options": {"url": "wss://voice.fixture", "token": ""}},
"commands": []
},
{
"name": "camera unpublish after resume plans a real command",
"event": {"type": "camera.unpublishRequested"},
"commands": [{"type": "camera.unpublish", "operationId": 2}]
},
{
"name": "camera unpublish succeeded",
"event": {"type": "camera.unpublishSucceeded", "operationId": 2},
"commands": []
},
{
"name": "true remote disconnect resets the session",
"event": {"type": "connection.remoteDisconnected", "reason": "network"},
"commands": []
}
],
"expected": {
"nextOperationId": 3,
"connectionStatus": "idle",
"activeUrl": null,
"desiredUrl": null,
"gatewayChannelId": null,
"lifecycleTearingDown": false
}
}
@@ -0,0 +1,53 @@
{
"name": "screen_audio_inclusion_toggle",
"events": [
{
"type": "connection.connectRequested",
"options": {"url": "wss://voice.example.test", "token": "token-screen-audio"}
},
{"type": "connection.connectSucceeded", "operationId": 1},
{
"type": "screen.publishRequested",
"options": {"captureId": "capture-1", "width": 1920, "height": 1080, "codec": "h264", "maxFramerate": 30}
},
{"type": "screen.publishSucceeded", "operationId": 2},
{"type": "screenAudio.publishRequested", "options": {"sampleRate": 48000, "numChannels": 2}},
{"type": "screenAudio.publishSucceeded", "operationId": 3},
{
"type": "screen.updateEncodingRequested",
"options": {"captureId": "capture-1", "width": 1920, "height": 1080, "frameRate": 60}
},
{"type": "screen.updateEncodingSucceeded", "operationId": 4},
{"type": "screenAudio.unpublishRequested"},
{"type": "screenAudio.unpublishSucceeded", "operationId": 5},
{"type": "screenAudio.publishRequested", "options": {"sampleRate": 48000, "numChannels": 2}},
{"type": "screenAudio.publishSucceeded", "operationId": 6}
],
"expectedCommands": [
{
"type": "connection.connect",
"operationId": 1,
"options": {"url": "wss://voice.example.test", "token": "token-screen-audio"}
},
{
"type": "screen.publish",
"operationId": 2,
"options": {"captureId": "capture-1", "width": 1920, "height": 1080, "codec": "h264", "maxFramerate": 30}
},
{"type": "screenAudio.publish", "operationId": 3, "options": {"sampleRate": 48000, "numChannels": 2}},
{
"type": "screen.updateEncoding",
"operationId": 4,
"options": {"captureId": "capture-1", "width": 1920, "height": 1080, "frameRate": 60}
},
{"type": "screenAudio.unpublish", "operationId": 5},
{"type": "screenAudio.publish", "operationId": 6, "options": {"sampleRate": 48000, "numChannels": 2}}
],
"expected": {
"nextOperationId": 7,
"screenStatus": "published",
"screenCaptureId": "capture-1",
"screenAudioStatus": "published",
"lastFailureCode": null
}
}
@@ -0,0 +1,58 @@
{
"name": "screen_audio_routing",
"events": [
{
"type": "connection.connectRequested",
"options": {
"url": "wss://voice.example.test",
"token": "token-audio"
}
},
{
"type": "connection.connectSucceeded",
"operationId": 1
},
{
"type": "screenAudio.publishRequested",
"options": {
"sampleRate": 48000,
"numChannels": 2,
"route": "native",
"captureId": "capture-screen-1",
"tapId": "tap-screen-1"
}
},
{
"type": "screenAudio.publishSucceeded",
"operationId": 2
}
],
"expectedCommands": [
{
"type": "connection.connect",
"operationId": 1,
"options": {
"url": "wss://voice.example.test",
"token": "token-audio"
}
},
{
"type": "screenAudio.publish",
"operationId": 2,
"options": {
"sampleRate": 48000,
"numChannels": 2,
"route": "native",
"captureId": "capture-screen-1",
"tapId": "tap-screen-1"
}
}
],
"expected": {
"nextOperationId": 3,
"screenAudioStatus": "published",
"screenAudioRoute": "native",
"screenAudioTapId": "tap-screen-1",
"lastFailureCode": null
}
}
@@ -0,0 +1,95 @@
{
"name": "screen_share_start_update_stop",
"events": [
{
"type": "connection.connectRequested",
"options": {
"url": "wss://voice.example.test",
"token": "token-screen"
}
},
{
"type": "connection.connectSucceeded",
"operationId": 1
},
{
"type": "screen.publishRequested",
"options": {
"captureId": "capture-screen-1",
"width": 2560,
"height": 1440,
"codec": "h264",
"maxFramerate": 60,
"maxBitrateBps": 8000000
}
},
{
"type": "screen.publishSucceeded",
"operationId": 2
},
{
"type": "screen.updateEncodingRequested",
"options": {
"captureId": "capture-screen-1",
"width": 1280,
"height": 720,
"frameRate": 30,
"maxBitrateBps": 3000000
}
},
{
"type": "screen.updateEncodingSucceeded",
"operationId": 3
},
{
"type": "screen.unpublishRequested"
},
{
"type": "screen.unpublishSucceeded",
"operationId": 4
}
],
"expectedCommands": [
{
"type": "connection.connect",
"operationId": 1,
"options": {
"url": "wss://voice.example.test",
"token": "token-screen"
}
},
{
"type": "screen.publish",
"operationId": 2,
"options": {
"captureId": "capture-screen-1",
"width": 2560,
"height": 1440,
"codec": "h264",
"maxFramerate": 60,
"maxBitrateBps": 8000000
}
},
{
"type": "screen.updateEncoding",
"operationId": 3,
"options": {
"captureId": "capture-screen-1",
"width": 1280,
"height": 720,
"frameRate": 30,
"maxBitrateBps": 3000000
}
},
{
"type": "screen.unpublish",
"operationId": 4
}
],
"expected": {
"nextOperationId": 5,
"screenStatus": "idle",
"screenCaptureId": null,
"lastFailureCode": null
}
}
@@ -0,0 +1,84 @@
{
"name": "stale_connection",
"description": "A stale connect completion is rejected after a newer connect operation supersedes it.",
"steps": [
{
"name": "request first connection",
"event": {
"type": "connection.connectRequested",
"options": {
"url": "wss://voice-one.example.test",
"token": "token-1"
}
},
"commands": [
{
"type": "connection.connect",
"operationId": 1,
"options": {
"url": "wss://voice-one.example.test",
"token": "token-1"
}
}
]
},
{
"name": "request replacement connection",
"event": {
"type": "connection.connectRequested",
"options": {
"url": "wss://voice-two.example.test",
"token": "token-2"
}
},
"commands": [
{
"type": "connection.connect",
"operationId": 2,
"options": {
"url": "wss://voice-two.example.test",
"token": "token-2"
}
}
]
},
{
"name": "stale first completion arrives",
"event": {
"type": "connection.connectSucceeded",
"operationId": 1
},
"commands": []
},
{
"name": "runtime rejects stale first completion",
"event": {
"type": "command.staleCompletionRejected",
"operationId": 1,
"commandType": "connection.connect",
"resourceKey": "connection"
},
"commands": []
},
{
"name": "replacement completion succeeds",
"event": {
"type": "connection.connectSucceeded",
"operationId": 2
},
"commands": []
}
],
"expected": {
"nextOperationId": 3,
"connectionStatus": "connected",
"activeUrl": "wss://voice-two.example.test",
"desiredUrl": "wss://voice-two.example.test",
"gatewayChannelId": null,
"lifecycleTearingDown": false,
"operationStatuses": {
"1": "stale",
"2": "succeeded"
}
}
}
@@ -0,0 +1,99 @@
{
"name": "stats_lifecycle",
"events": [
{
"type": "connection.connectRequested",
"options": {
"url": "wss://voice.example.test",
"token": "token-1"
}
},
{"type": "connection.connectSucceeded", "operationId": 1},
{"type": "stats.collectRequested"},
{
"type": "stats.collected",
"operationId": 2,
"stats": {
"rttMs": 24,
"outbound": [
{
"trackSid": "mic-track",
"source": "microphone",
"kind": "audio",
"bitrateKbps": 42,
"packetsLost": 1,
"packetsSent": 100
},
{
"trackSid": "screen-track",
"source": "screenshare",
"kind": "video",
"codec": "video/H265",
"bitrateKbps": 3500,
"packetsLost": 0,
"effectiveFps": 58.5,
"configuredFps": 60,
"targetFps": 60,
"width": 1920,
"height": 1080,
"zeroCopy": true
}
],
"inbound": [
{
"participantIdentity": "remote-user",
"participantSid": "participant-1",
"trackSid": "remote-audio",
"kind": "audio",
"bitrateKbps": 36,
"packetsLost": 3,
"packetsReceived": 97,
"jitterMs": 7
}
],
"droppedNativeVideoFrames": 2,
"droppedVideoFrameCallbacks": 1
}
}
],
"expectedCommands": [
[
{
"type": "connection.connect",
"operationId": 1,
"options": {"url": "wss://voice.example.test", "token": "token-1"}
}
],
[],
[{"type": "stats.collect", "operationId": 2}],
[]
],
"expected": {
"nextOperationId": 3,
"statsOperationId": null,
"statsFailureCode": null,
"summary": {
"network": {
"audioSendBitrateKbps": 42,
"audioRecvBitrateKbps": 36,
"videoSendBitrateKbps": 3500,
"videoRecvBitrateKbps": 0,
"audioPacketLossPercent": 3,
"videoPacketLossPercent": 0,
"jitterMs": 7,
"rttMs": 24
},
"localAudio": {"trackIdentifier": "mic-track"},
"localScreenShare": {
"trackIdentifier": "screen-track",
"codec": "video/H265",
"effectiveFramesPerSecond": 58.5,
"configuredFramesPerSecond": 60,
"targetFramesPerSecond": 60,
"frameWidth": 1920,
"frameHeight": 1080
},
"remoteAudio": {"trackIdentifier": "remote-audio"}
}
}
}
@@ -0,0 +1,81 @@
{
"name": "remote subscription quality and participant volume commands",
"events": [
{"type": "connection.connectRequested", "options": {"url": "wss://voice", "token": "token"}},
{"type": "connection.connectSucceeded", "operationId": 1},
{
"type": "remoteTrackSubscription.setRequested",
"options": {
"participantIdentity": "alice",
"source": "screen",
"subscribed": true,
"enabled": true,
"quality": "high"
}
},
{
"type": "remoteTrackSubscription.setRequested",
"options": {
"participantIdentity": "alice",
"source": "screen",
"subscribed": true,
"enabled": true,
"quality": "high"
}
},
{
"type": "remoteTrackSubscription.setRequested",
"options": {
"participantIdentity": "alice",
"source": "screen",
"subscribed": true,
"enabled": true,
"quality": "low"
}
},
{"type": "participantVolume.setRequested", "options": {"participantIdentity": "alice", "volume": 0.35}},
{"type": "participantVolume.setRequested", "options": {"participantIdentity": "alice", "volume": 0.35}}
],
"expected": {
"remoteTrackSubscriptions": {
"alice:screen": {
"participantIdentity": "alice",
"source": "screen",
"subscribed": true,
"enabled": true,
"quality": "low"
}
},
"participantVolumes": {"alice": 0.35},
"commands": [
{"type": "connection.connect", "operationId": 1, "options": {"url": "wss://voice", "token": "token"}},
{
"type": "remoteTrackSubscription.set",
"operationId": 2,
"options": {
"participantIdentity": "alice",
"source": "screen",
"subscribed": true,
"enabled": true,
"quality": "high"
}
},
{
"type": "remoteTrackSubscription.set",
"operationId": 3,
"options": {
"participantIdentity": "alice",
"source": "screen",
"subscribed": true,
"enabled": true,
"quality": "low"
}
},
{
"type": "participantVolume.set",
"operationId": 4,
"options": {"participantIdentity": "alice", "volume": 0.35}
}
]
}
}
@@ -0,0 +1,111 @@
{
"name": "teardown_renderer_window",
"description": "Renderer teardown clears gateway state, disconnects media, then runs host lifecycle teardown.",
"steps": [
{
"name": "gateway channel observed",
"event": {
"type": "gateway.voiceStateUpdated",
"voiceState": {
"guildId": "guild-1",
"channelId": "channel-1",
"userId": "user-1",
"sessionId": "session-1",
"selfMute": false,
"selfDeaf": false,
"selfVideo": false,
"selfStream": false,
"suppress": false,
"requestToSpeakTimestamp": null
}
},
"commands": []
},
{
"name": "media connection requested",
"event": {
"type": "connection.connectRequested",
"options": {
"url": "wss://voice-one.example.test",
"token": "token-1"
}
},
"commands": [
{
"type": "connection.connect",
"operationId": 1,
"options": {
"url": "wss://voice-one.example.test",
"token": "token-1"
}
}
]
},
{
"name": "media connection succeeds",
"event": {
"type": "connection.connectSucceeded",
"operationId": 1
},
"commands": []
},
{
"name": "renderer teardown requested",
"event": {
"type": "lifecycle.teardownRequested",
"reason": "rendererDisposed"
},
"commands": [
{
"type": "gateway.voiceState.clear",
"operationId": 2,
"guildId": "guild-1"
}
]
},
{
"name": "gateway clear succeeds",
"event": {
"type": "gateway.voiceStateClearSucceeded",
"operationId": 2
},
"commands": [
{
"type": "connection.disconnect",
"operationId": 3,
"reason": "shutdown"
}
]
},
{
"name": "media disconnect succeeds",
"event": {
"type": "connection.disconnectSucceeded",
"operationId": 3
},
"commands": [
{
"type": "lifecycle.teardown",
"operationId": 4,
"reason": "rendererDisposed"
}
]
},
{
"name": "host teardown succeeds",
"event": {
"type": "lifecycle.teardownSucceeded",
"operationId": 4
},
"commands": []
}
],
"expected": {
"nextOperationId": 5,
"connectionStatus": "idle",
"activeUrl": null,
"desiredUrl": null,
"gatewayChannelId": null,
"lifecycleTearingDown": false
}
}
@@ -0,0 +1,88 @@
{
"name": "watched streams drive subscription commands",
"events": [
{"type": "connection.connectRequested", "options": {"url": "wss://voice", "token": "token"}},
{"type": "connection.connectSucceeded", "operationId": 1},
{
"type": "watchedStream.watchRequested",
"stream": {
"participantIdentity": "alice",
"source": "screen",
"trackSid": null,
"quality": "high",
"enabled": true
}
},
{
"type": "room.trackPublished",
"track": {
"participantIdentity": "alice",
"participantSid": "PA_alice",
"trackSid": "TR_screen",
"trackName": "screen",
"kind": "video",
"source": "screen",
"muted": false
}
},
{
"type": "watchedStream.watchRequested",
"stream": {
"participantIdentity": "alice",
"source": "screen",
"trackSid": "TR_screen",
"quality": "low",
"enabled": true
}
},
{"type": "watchedStream.unwatchRequested", "stream": {"participantIdentity": "alice", "source": "screen"}}
],
"expected": {
"watchedStreams": [],
"remoteTrackSubscriptions": {
"alice:screen": {
"participantIdentity": "alice",
"source": "screen",
"subscribed": false,
"enabled": false,
"quality": "low"
}
},
"commands": [
{"type": "connection.connect", "operationId": 1, "options": {"url": "wss://voice", "token": "token"}},
{
"type": "remoteTrackSubscription.set",
"operationId": 2,
"options": {
"participantIdentity": "alice",
"source": "screen",
"subscribed": true,
"enabled": true,
"quality": "high"
}
},
{
"type": "remoteTrackSubscription.set",
"operationId": 3,
"options": {
"participantIdentity": "alice",
"source": "screen",
"subscribed": true,
"enabled": true,
"quality": "low"
}
},
{
"type": "remoteTrackSubscription.set",
"operationId": 4,
"options": {
"participantIdentity": "alice",
"source": "screen",
"subscribed": false,
"enabled": false,
"quality": "low"
}
}
]
}
}