mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 13:05:32 +09:00
refactor(voice): drop the native only surface from voice_engine_v2 and narrow the desktop bridge (#1788)
This commit is contained in:
1 parent
9731bac40f
commit
4f21430880
43 files changed
+196
-3682
No files matched your search
@@ -1,93 +0,0 @@
|
||||
{
|
||||
"version": 18,
|
||||
"methods": [
|
||||
"isSupported",
|
||||
"getCapabilities",
|
||||
"prewarm",
|
||||
"getHardwareEncoderCapabilities",
|
||||
"connect",
|
||||
"disconnect",
|
||||
"isConnected",
|
||||
"publishMicrophone",
|
||||
"pushPcm",
|
||||
"publishScreen",
|
||||
"updateScreenShareEncoding",
|
||||
"unpublishScreen",
|
||||
"publishScreenAudio",
|
||||
"pushScreenAudioPcm",
|
||||
"pushScreenAudioFloat",
|
||||
"unpublishScreenAudio",
|
||||
"setMicEnabled",
|
||||
"setSpeakingDetection",
|
||||
"listAudioInputDevices",
|
||||
"listAudioOutputDevices",
|
||||
"setAudioOutputDevice",
|
||||
"setParticipantVolume",
|
||||
"setRemoteTrackSubscription",
|
||||
"publishData",
|
||||
"listCameraDevices",
|
||||
"publishCamera",
|
||||
"updateCameraCapture",
|
||||
"publishNativeCameraSink",
|
||||
"publishProcessedCamera",
|
||||
"pushProcessedCameraFrame",
|
||||
"pushCameraBackgroundFrame",
|
||||
"clearCameraBackgroundFrame",
|
||||
"publishDeviceScreenShare",
|
||||
"unpublishCamera",
|
||||
"isPublishingCamera",
|
||||
"startCameraPreview",
|
||||
"stopCameraPreview",
|
||||
"getConnectionStats",
|
||||
"getVoiceEngineReadiness",
|
||||
"getAudioDeviceModuleState",
|
||||
"onEvent",
|
||||
"onVideoFrame"
|
||||
],
|
||||
"ipcChannels": {
|
||||
"isSupported": "voice-engine-v2:is-supported",
|
||||
"getCapabilities": "voice-engine-v2:get-capabilities",
|
||||
"prewarm": "voice-engine-v2:prewarm",
|
||||
"getHardwareEncoderCapabilities": "voice-engine-v2:get-hardware-encoder-capabilities",
|
||||
"connect": "voice-engine-v2:connect",
|
||||
"disconnect": "voice-engine-v2:disconnect",
|
||||
"isConnected": "voice-engine-v2:is-connected",
|
||||
"publishMicrophone": "voice-engine-v2:publish-microphone",
|
||||
"pushPcm": "voice-engine-v2:push-pcm",
|
||||
"publishScreen": "voice-engine-v2:publish-screen",
|
||||
"updateScreenShareEncoding": "voice-engine-v2:update-screen-share-encoding",
|
||||
"unpublishScreen": "voice-engine-v2:unpublish-screen",
|
||||
"publishScreenAudio": "voice-engine-v2:publish-screen-audio",
|
||||
"pushScreenAudioPcm": "voice-engine-v2:push-screen-audio-pcm",
|
||||
"pushScreenAudioFloat": "voice-engine-v2:push-screen-audio-float",
|
||||
"unpublishScreenAudio": "voice-engine-v2:unpublish-screen-audio",
|
||||
"setMicEnabled": "voice-engine-v2:set-mic-enabled",
|
||||
"setSpeakingDetection": "voice-engine-v2:set-speaking-detection",
|
||||
"listAudioInputDevices": "voice-engine-v2:list-audio-input-devices",
|
||||
"listAudioOutputDevices": "voice-engine-v2:list-audio-output-devices",
|
||||
"setAudioOutputDevice": "voice-engine-v2:set-audio-output-device",
|
||||
"setParticipantVolume": "voice-engine-v2:set-participant-volume",
|
||||
"setRemoteTrackSubscription": "voice-engine-v2:set-remote-track-subscription",
|
||||
"publishData": "voice-engine-v2:publish-data",
|
||||
"listCameraDevices": "voice-engine-v2:list-camera-devices",
|
||||
"publishCamera": "voice-engine-v2:publish-camera",
|
||||
"updateCameraCapture": "voice-engine-v2:update-camera-capture",
|
||||
"publishNativeCameraSink": "voice-engine-v2:publish-native-camera-sink",
|
||||
"publishProcessedCamera": "voice-engine-v2:publish-processed-camera",
|
||||
"pushProcessedCameraFrame": "voice-engine-v2:push-processed-camera-frame",
|
||||
"pushCameraBackgroundFrame": "voice-engine-v2:push-camera-background-frame",
|
||||
"clearCameraBackgroundFrame": "voice-engine-v2:clear-camera-background-frame",
|
||||
"publishDeviceScreenShare": "voice-engine-v2:publish-device-screen-share",
|
||||
"unpublishCamera": "voice-engine-v2:unpublish-camera",
|
||||
"isPublishingCamera": "voice-engine-v2:is-publishing-camera",
|
||||
"startCameraPreview": "voice-engine-v2:start-camera-preview",
|
||||
"stopCameraPreview": "voice-engine-v2:stop-camera-preview",
|
||||
"getConnectionStats": "voice-engine-v2:get-connection-stats",
|
||||
"getVoiceEngineReadiness": "voice-engine-v2:get-readiness",
|
||||
"getAudioDeviceModuleState": "voice-engine-v2:get-audio-device-module-state"
|
||||
},
|
||||
"eventChannels": {
|
||||
"event": "voice-engine-v2:event",
|
||||
"videoFrame": "voice-engine-v2:video-frame"
|
||||
}
|
||||
}
|
||||
@@ -658,10 +658,6 @@
|
||||
"serverRegion": "us-east",
|
||||
"failure": null
|
||||
},
|
||||
"nativeAudioDeviceModule": {
|
||||
"status": "unsupported",
|
||||
"detail": null
|
||||
},
|
||||
"microphone": {
|
||||
"status": "published",
|
||||
"desired": {
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
[
|
||||
{"raw": "encrypted", "expected": "encrypted"},
|
||||
{"raw": "ok", "expected": "encrypted"},
|
||||
{"raw": "decryption_failed", "expected": "decryption_failed"},
|
||||
{"raw": "decryptionFailed", "expected": "decryption_failed"},
|
||||
{"raw": "error", "expected": "decryption_failed"},
|
||||
{"raw": "broken", "expected": "decryption_failed"},
|
||||
{"raw": "unencrypted", "expected": "unencrypted"},
|
||||
{"raw": "missing_key", "expected": "unencrypted"},
|
||||
{"raw": "missingKey", "expected": "unencrypted"},
|
||||
{"raw": "internal_error", "expected": "unencrypted"},
|
||||
{"raw": "unexpected", "expected": "unknown"},
|
||||
{"raw": null, "expected": "unknown"}
|
||||
]
|
||||
@@ -1,56 +0,0 @@
|
||||
[
|
||||
{
|
||||
"name": "camera unpublish suppressed during reconnect when video restore is pending",
|
||||
"input": {"source": "camera", "enabled": false, "reconnecting": true, "restoreVideo": true, "restoreStream": false},
|
||||
"expected": true
|
||||
},
|
||||
{
|
||||
"name": "screen share unpublish suppressed during reconnect when stream restore is pending",
|
||||
"input": {
|
||||
"source": "screen_share",
|
||||
"enabled": false,
|
||||
"reconnecting": true,
|
||||
"restoreVideo": false,
|
||||
"restoreStream": true
|
||||
},
|
||||
"expected": true
|
||||
},
|
||||
{
|
||||
"name": "publish events are not suppressed",
|
||||
"input": {
|
||||
"source": "screen_share",
|
||||
"enabled": true,
|
||||
"reconnecting": true,
|
||||
"restoreVideo": false,
|
||||
"restoreStream": true
|
||||
},
|
||||
"expected": false
|
||||
},
|
||||
{
|
||||
"name": "inactive reconnect is not suppressed",
|
||||
"input": {
|
||||
"source": "screen_share",
|
||||
"enabled": false,
|
||||
"reconnecting": false,
|
||||
"restoreVideo": false,
|
||||
"restoreStream": true
|
||||
},
|
||||
"expected": false
|
||||
},
|
||||
{
|
||||
"name": "camera without video restore is not suppressed",
|
||||
"input": {"source": "camera", "enabled": false, "reconnecting": true, "restoreVideo": false, "restoreStream": true},
|
||||
"expected": false
|
||||
},
|
||||
{
|
||||
"name": "microphone is not suppressed",
|
||||
"input": {
|
||||
"source": "microphone",
|
||||
"enabled": false,
|
||||
"reconnecting": true,
|
||||
"restoreVideo": true,
|
||||
"restoreStream": true
|
||||
},
|
||||
"expected": false
|
||||
}
|
||||
]
|
||||
@@ -1,98 +0,0 @@
|
||||
[
|
||||
{
|
||||
"name": "retry while accepted connection is still connecting before gateway echo",
|
||||
"input": {
|
||||
"connectionId": "connection-a",
|
||||
"guildId": "guild-a",
|
||||
"channelId": "channel-a",
|
||||
"voiceState": null,
|
||||
"connectionState": {
|
||||
"connectionId": "connection-a",
|
||||
"guildId": "guild-a",
|
||||
"channelId": "channel-a",
|
||||
"connecting": true,
|
||||
"connected": false,
|
||||
"reconnecting": false
|
||||
}
|
||||
},
|
||||
"expected": true
|
||||
},
|
||||
{
|
||||
"name": "retry when gateway voice state confirms channel",
|
||||
"input": {
|
||||
"connectionId": "connection-a",
|
||||
"guildId": "guild-a",
|
||||
"channelId": "channel-a",
|
||||
"voiceState": {
|
||||
"guild_id": "guild-a",
|
||||
"channel_id": "channel-a"
|
||||
},
|
||||
"connectionState": {
|
||||
"connectionId": "stale-connection",
|
||||
"guildId": "guild-a",
|
||||
"channelId": "channel-a",
|
||||
"connecting": false,
|
||||
"connected": false,
|
||||
"reconnecting": false
|
||||
}
|
||||
},
|
||||
"expected": true
|
||||
},
|
||||
{
|
||||
"name": "reject stale local connection",
|
||||
"input": {
|
||||
"connectionId": "connection-a",
|
||||
"guildId": "guild-a",
|
||||
"channelId": "channel-a",
|
||||
"voiceState": null,
|
||||
"connectionState": {
|
||||
"connectionId": "connection-b",
|
||||
"guildId": "guild-a",
|
||||
"channelId": "channel-a",
|
||||
"connecting": true,
|
||||
"connected": false,
|
||||
"reconnecting": false
|
||||
}
|
||||
},
|
||||
"expected": false
|
||||
},
|
||||
{
|
||||
"name": "reject inactive accepted connection",
|
||||
"input": {
|
||||
"connectionId": "connection-a",
|
||||
"guildId": "guild-a",
|
||||
"channelId": "channel-a",
|
||||
"voiceState": null,
|
||||
"connectionState": {
|
||||
"connectionId": "connection-a",
|
||||
"guildId": "guild-a",
|
||||
"channelId": "channel-a",
|
||||
"connecting": false,
|
||||
"connected": false,
|
||||
"reconnecting": false
|
||||
}
|
||||
},
|
||||
"expected": false
|
||||
},
|
||||
{
|
||||
"name": "treat null guild ids as equivalent private voice scope",
|
||||
"input": {
|
||||
"connectionId": "connection-a",
|
||||
"guildId": null,
|
||||
"channelId": "dm-channel-a",
|
||||
"voiceState": {
|
||||
"guild_id": null,
|
||||
"channel_id": "dm-channel-a"
|
||||
},
|
||||
"connectionState": {
|
||||
"connectionId": "connection-b",
|
||||
"guildId": null,
|
||||
"channelId": "dm-channel-a",
|
||||
"connecting": false,
|
||||
"connected": false,
|
||||
"reconnecting": false
|
||||
}
|
||||
},
|
||||
"expected": true
|
||||
}
|
||||
]
|
||||
@@ -1,37 +0,0 @@
|
||||
[
|
||||
{
|
||||
"name": "local mute wins",
|
||||
"input": {"userVolumePercent": 200, "outputVolumePercent": 100, "locallyMuted": true},
|
||||
"expected": 0
|
||||
},
|
||||
{
|
||||
"name": "unity gain",
|
||||
"input": {"userVolumePercent": 100, "outputVolumePercent": 100, "locallyMuted": false},
|
||||
"expected": 1
|
||||
},
|
||||
{
|
||||
"name": "max user volume reaches ceiling",
|
||||
"input": {"userVolumePercent": 200, "outputVolumePercent": 100, "locallyMuted": false},
|
||||
"expected": 2
|
||||
},
|
||||
{
|
||||
"name": "quiet participant below unity",
|
||||
"input": {"userVolumePercent": 50, "outputVolumePercent": 100, "locallyMuted": false},
|
||||
"expectedRange": {"minExclusive": 0, "maxExclusive": 1}
|
||||
},
|
||||
{
|
||||
"name": "zero composed volume",
|
||||
"input": {"userVolumePercent": 0, "outputVolumePercent": 100, "locallyMuted": false},
|
||||
"expected": 0
|
||||
},
|
||||
{
|
||||
"name": "non finite values fall back to unity inputs",
|
||||
"input": {"userVolumePercent": null, "outputVolumePercent": null, "locallyMuted": false},
|
||||
"expected": 1
|
||||
},
|
||||
{
|
||||
"name": "oversized values clamp to native range",
|
||||
"input": {"userVolumePercent": 999, "outputVolumePercent": 999, "locallyMuted": false},
|
||||
"expectedRange": {"minInclusive": 0, "maxInclusive": 2}
|
||||
}
|
||||
]
|
||||
Reference in new issue
Block a user