Merge pull request #3230 from kstonekuan/fix/smallwebrtcrequesthandler-return-type

Fix return type for SmallWebRTCRequestHandler.handle_web_request
This commit is contained in:
Mark Backman
2025-12-15 13:01:45 -05:00
committed by GitHub

View File

@@ -160,7 +160,7 @@ class SmallWebRTCRequestHandler:
self,
request: SmallWebRTCRequest,
webrtc_connection_callback: Callable[[Any], Awaitable[None]],
) -> None:
) -> Optional[Dict[str, str]]:
"""Handle a SmallWebRTC request and resolve the pending answer.
This method will:
@@ -176,6 +176,10 @@ class SmallWebRTCRequestHandler:
webrtc_connection_callback (Callable[[Any], Awaitable[None]]): An
asynchronous callback function that is invoked with the WebRTC connection.
Returns:
Dictionary containing SDP answer, type, and peer connection ID,
or None if no answer is available.
Raises:
HTTPException: If connection mode constraints are violated
Exception: Any exception raised during request handling or callback execution