mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Fix WebRTC for Firefox by ignoring empty ice candidates (#21908)
* handle firefox empty string ice candidate * use optional chaining as per comment
This commit is contained in:
parent
84b2005844
commit
de292a8143
@ -109,7 +109,7 @@ class HaWebRtcPlayer extends LitElement {
|
||||
let candidates = ""; // Build an Offer SDP string with ice candidates
|
||||
const iceResolver = new Promise<void>((resolve) => {
|
||||
peerConnection.addEventListener("icecandidate", async (event) => {
|
||||
if (!event.candidate) {
|
||||
if (!event.candidate?.candidate) {
|
||||
resolve(); // Gathering complete
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user