Skip to content

Commit 2ea5d9d

Browse files
committed
fix: remote video not working if we have no camera
When you are the caller. Closes #90. I have tested this, it fixes the bug.
1 parent 4ee9b9a commit 2ea5d9d

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎src/lib/calls.ts‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,15 @@ export class CallsManager {
342342
}
343343

344344
async startCall(): Promise<void> {
345+
// Make sure to add both audio and video transceivers,
346+
// regardless of whether we have both camera and mic,
347+
// because otherwise e.g. if we don't have camera but the remove peer does,
348+
// then we would need another round of negotiation,
349+
// but as of writing we can only do one.
350+
// See https://github.com/deltachat/calls-webapp/issues/90.
351+
this.peerConnection.addTransceiver("video", { direction: "sendrecv" });
352+
this.peerConnection.addTransceiver("audio", { direction: "sendrecv" });
353+
345354
await this.setIceServersPromise;
346355
const gatheredEnoughIceP = gatheredEnoughIce(this.peerConnection);
347356
const outStream = await this.outStreamPromise;

0 commit comments

Comments
 (0)