diff --git a/lib/features/desktop/desktop_client.dart b/lib/features/desktop/desktop_client.dart index b5e45e88..f0898830 100644 --- a/lib/features/desktop/desktop_client.dart +++ b/lib/features/desktop/desktop_client.dart @@ -38,6 +38,9 @@ Future desktopRemoteVideoStreamForTrack( if (event.track.kind != 'video') { return null; } + if (event.streams.isNotEmpty) { + return event.streams.first; + } final stream = await createFallbackStream('xworkmate-remote-desktop'); await stream.addTrack(event.track); return stream; diff --git a/test/runtime/gateway_acp_client_auth_test.dart b/test/runtime/gateway_acp_client_auth_test.dart index 4e5e0b91..dd112714 100644 --- a/test/runtime/gateway_acp_client_auth_test.dart +++ b/test/runtime/gateway_acp_client_auth_test.dart @@ -1005,6 +1005,17 @@ void main() { 'output': 'recovered after running snapshot', 'turnId': 'turn-recovered-running', }, + if (completed) + 'artifacts': { + 'items': >[ + { + 'relativePath': 'exports/snapshot.md', + 'downloadUrl': 'https://xworkmate-bridge.svc.plus/artifacts/openclaw/download?sessionKey=unit-fixture-task-b&runId=turn-recovered-running&relativePath=exports%2Fsnapshot.md', + 'contentType': 'text/markdown', + 'sizeBytes': 64, + }, + ], + }, }, }), );