update smallWebRTC screen support to support the utils format for listening to screenshares

This commit is contained in:
mattie ruth backman
2025-08-14 15:11:13 -04:00
committed by Mattie Ruth
parent 40f1f4ff11
commit b987579d54
3 changed files with 42 additions and 13 deletions

View File

@@ -233,12 +233,15 @@ async def maybe_capture_participant_camera(
framerate: Video capture framerate. Defaults to 0 (auto).
"""
try:
from pipecat.transports.network.small_webrtc import SmallWebRTCTransport
from pipecat.transports.services.daily import DailyTransport
if isinstance(transport, DailyTransport):
await transport.capture_participant_video(
client["id"], framerate=framerate, video_source="camera"
)
elif isinstance(transport, SmallWebRTCTransport):
await transport.capture_participant_video(video_source="camera")
except ImportError:
pass
@@ -254,12 +257,16 @@ async def maybe_capture_participant_screen(
framerate: Video capture framerate. Defaults to 0 (auto).
"""
try:
from pipecat.transports.network.small_webrtc import SmallWebRTCTransport
from pipecat.transports.services.daily import DailyTransport
if isinstance(transport, DailyTransport):
await transport.capture_participant_video(
client["id"], framerate=framerate, video_source="screenVideo"
)
elif isinstance(transport, SmallWebRTCTransport):
await transport.capture_participant_video(video_source="screenVideo")
except ImportError:
pass