mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00: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:
|
try:
|
||||||
async with async_timeout.timeout(TIMEOUT):
|
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:
|
except TimeoutError as err:
|
||||||
raise HomeAssistantError("Timeout talking to RTSPtoWebRTC server") from err
|
raise HomeAssistantError("Timeout talking to RTSPtoWebRTC server") from err
|
||||||
except ClientError as err:
|
except ClientError as err:
|
||||||
|
@ -175,6 +175,13 @@ async def test_offer_for_stream_source(
|
|||||||
assert response["result"].get("answer") == ANSWER_SDP
|
assert response["result"].get("answer") == ANSWER_SDP
|
||||||
assert "error" not in response
|
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(
|
async def test_offer_failure(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user