mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 11:16:35 +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
|
let candidates = ""; // Build an Offer SDP string with ice candidates
|
||||||
const iceResolver = new Promise<void>((resolve) => {
|
const iceResolver = new Promise<void>((resolve) => {
|
||||||
peerConnection.addEventListener("icecandidate", async (event) => {
|
peerConnection.addEventListener("icecandidate", async (event) => {
|
||||||
if (!event.candidate) {
|
if (!event.candidate?.candidate) {
|
||||||
resolve(); // Gathering complete
|
resolve(); // Gathering complete
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user