don't automatically join a call we create

This commit is contained in:
Bruno Windels 2022-04-11 15:54:06 +02:00
parent b84c90891c
commit 9be64730b6
2 changed files with 2 additions and 2 deletions

View File

@ -359,7 +359,8 @@ export class RoomViewModel extends ViewModel {
const mediaTracks = await this.platform.mediaDevices.getMediaTracks(false, true);
const localMedia = new LocalMedia().withTracks(mediaTracks);
// this will set the callViewModel above as a call will be added to callHandler.calls
await session.callHandler.createCall(this._room.id, localMedia, "A call " + Math.round(this.platform.random() * 100));
const call = await session.callHandler.createCall(this._room.id, localMedia, "A call " + Math.round(this.platform.random() * 100));
await call.join(localMedia);
} catch (err) {
console.error(err.stack);
alert(err.message);

View File

@ -117,7 +117,6 @@ export class CallHandler {
try {
await call.create(localMedia);
await call.join(localMedia);
// store call info so it will ring again when reopening the app
const txn = await this.options.storage.readWriteTxn([this.options.storage.storeNames.calls]);
txn.calls.add({