Skip to content

Commit

Permalink
Fix Firefox support
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Apr 12, 2021
1 parent 0c6d39c commit fd510de
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions custom_components/webrtc/www/webrtc-camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ class WebRTCCamera extends HTMLElement {
this.content.appendChild(el);
}

pc.addTransceiver('video', {'direction': 'recvonly'})
pc.addTransceiver('audio', {'direction': 'recvonly'})
// recvonly don't work with Firefox
// "Answer tried to set recv when offer did not set send"
pc.addTransceiver('video', {'direction': 'sendrecv'})
pc.addTransceiver('audio', {'direction': 'sendrecv'})

const pingChannel = pc.createDataChannel('foo');
pingChannel.onopen = () => {
Expand Down

0 comments on commit fd510de

Please sign in to comment.