From 3e3d50a8555cb29c4983adf76fd24f29e38f2a82 Mon Sep 17 00:00:00 2001 From: mattie ruth backman Date: Fri, 22 Aug 2025 12:43:30 -0400 Subject: [PATCH] Fix issue with request images from the camera introduced in smallwebrtctransport --- src/pipecat/transports/network/small_webrtc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pipecat/transports/network/small_webrtc.py b/src/pipecat/transports/network/small_webrtc.py index 080491319..348fa28d0 100644 --- a/src/pipecat/transports/network/small_webrtc.py +++ b/src/pipecat/transports/network/small_webrtc.py @@ -669,6 +669,9 @@ class SmallWebRTCInputTransport(BaseInputTransport): request_id = f"{frame.function_name}:{frame.tool_call_id}" self._image_requests[request_id] = frame + # Default to camera if no source specified + if frame.video_source is None: + frame.video_source = CAM_VIDEO_SOURCE # If we're not already receiving video, try to get a frame now if ( frame.video_source == CAM_VIDEO_SOURCE @@ -682,8 +685,6 @@ class SmallWebRTCInputTransport(BaseInputTransport): and not self._receive_screen_video_task and self._params.video_in_enabled ): - print(f"Starting screen video task in request_participant_image") - # Start screen video reception if it's not already running self._receive_screen_video_task = self.create_task( self._receive_video(SCREEN_VIDEO_SOURCE) @@ -719,7 +720,6 @@ class SmallWebRTCInputTransport(BaseInputTransport): and self._params.video_in_enabled ): # Start screen video reception if it's not already running - print(f"Starting screen video task in capture_participant_media") self._receive_screen_video_task = self.create_task( self._receive_video(SCREEN_VIDEO_SOURCE) )