fix return type for SmallWebRTCRequestHandler

This commit is contained in:
Kingston
2025-12-13 22:11:06 +08:00
parent 5f6448a8a4
commit 93df7044fa

View File

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