WebRTC fix for Safari (#10602)

This commit is contained in:
Allen Porter
2021-11-11 10:48:56 +01:00
committed by GitHub
parent d04823b4c5
commit c238c7dbbc
+3
View File
@@ -80,6 +80,9 @@ class HaWebRtcPlayer extends LitElement {
// Some cameras (such as nest) require a data channel to establish a stream
// however, not used by any integrations.
peerConnection.createDataChannel("dataSendChannel");
peerConnection.addTransceiver("audio", { direction: "recvonly" });
peerConnection.addTransceiver("video", { direction: "recvonly" });
const offerOptions: RTCOfferOptions = {
offerToReceiveAudio: true,
offerToReceiveVideo: true,