Skip to content

Commit

Permalink
Work around pion bug to fix screen sharing
Browse files Browse the repository at this point in the history
  • Loading branch information
dbkr committed Feb 2, 2023
1 parent e0a40cc commit 6ee8715
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/webrtc/call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,9 @@ export class MatrixCall extends TypedEventEmitter<CallEvent, CallEventHandlerMap
const sender = transceiver?.sender;

let added = false;
if (sender) {
// XXX: We don't re-use transceivers with the SFU: this is to work around
// https://github.com/matrix-org/waterfall/issues/98 - see the bug for more.
if (sender && !this.isFocus) {
try {
// We already have a sender, so we re-use it. We try to
// re-use transceivers as much as possible because they
Expand Down Expand Up @@ -959,6 +961,7 @@ export class MatrixCall extends TypedEventEmitter<CallEvent, CallEventHandlerMap
// (It's fine to specify the parameter on Firefox too,
// it just won't work.)
sendEncodings: this.isFocus ? encodings : undefined,
direction: callFeed.purpose === SDPStreamMetadataPurpose.Usermedia ? "sendrecv" : "sendonly",
});

if (this.isFocus && isFirefox()) {
Expand Down

0 comments on commit 6ee8715

Please sign in to comment.