mirror of
https://github.com/home-assistant/core
synced 2024-08-02 23:40:32 +02:00
Fix rtsp-to-webrtc bug in calling client library (#64502)
This commit is contained in:
parent
dc7231492e
commit
09920f5303
@ -67,7 +67,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
"""
|
||||
try:
|
||||
async with async_timeout.timeout(TIMEOUT):
|
||||
return await client.offer_stream_id(offer_sdp, stream_source, stream_id)
|
||||
return await client.offer_stream_id(stream_id, offer_sdp, stream_source)
|
||||
except TimeoutError as err:
|
||||
raise HomeAssistantError("Timeout talking to RTSPtoWebRTC server") from err
|
||||
except ClientError as err:
|
||||
|
@ -175,6 +175,13 @@ async def test_offer_for_stream_source(
|
||||
assert response["result"].get("answer") == ANSWER_SDP
|
||||
assert "error" not in response
|
||||
|
||||
# Validate request parameters were sent correctly
|
||||
assert len(aioclient_mock.mock_calls) == 1
|
||||
assert aioclient_mock.mock_calls[-1][2] == {
|
||||
"sdp64": base64.b64encode(OFFER_SDP.encode("utf-8")).decode("utf-8"),
|
||||
"url": STREAM_SOURCE,
|
||||
}
|
||||
|
||||
|
||||
async def test_offer_failure(
|
||||
hass: HomeAssistant,
|
||||
|
Loading…
Reference in New Issue
Block a user