diff --git a/internal/orchestrator/orchestrator.go b/internal/orchestrator/orchestrator.go index 66648936..25a286cd 100644 --- a/internal/orchestrator/orchestrator.go +++ b/internal/orchestrator/orchestrator.go @@ -59,9 +59,11 @@ var ( const ( DefaultDockerStopTimeoutSeconds = 5 - CameraDevice = "camera" - MicrophoneDevice = "microphone" - SpeakerDevice = "speaker" + CameraDevice = "camera" + RemoteCameraDevice = "remote_camera" + MicrophoneDevice = "microphone" + RemoteMicrophoneDevice = "remote_microphone" + SpeakerDevice = "speaker" ) type AppStreamMessage struct { @@ -1084,6 +1086,12 @@ func validateDevices(res *deviceResult, requiredDeviceClasses map[string]any) er if len(requiredDeviceClasses) > 0 { for class := range requiredDeviceClasses { switch class { + case RemoteCameraDevice: + // Remote camera does not require a local camera device to be present + continue + case RemoteMicrophoneDevice: + // Remote microphone does not require a local microphone device to be present + continue case CameraDevice: if !res.hasVideoDevice { return fmt.Errorf("no camera found") diff --git a/internal/orchestrator/provision.go b/internal/orchestrator/provision.go index babac0ce..41eaf280 100644 --- a/internal/orchestrator/provision.go +++ b/internal/orchestrator/provision.go @@ -275,6 +275,8 @@ func generateMainComposeFile( // 6. Collect all the required device classes from the app descriptor if len(app.Descriptor.RequiredDevices) > 0 { + // Required devices defined at app level take precedence over brick defined ones + requiredDeviceClasses = make(map[string]any) for _, deviceClass := range app.Descriptor.RequiredDevices { requiredDeviceClasses[deviceClass] = true }