Group calling: disable local camera when call disconnects
This commit is contained in:
parent
34574583b6
commit
7b6ad345ae
1 changed files with 5 additions and 3 deletions
|
@ -390,14 +390,16 @@ export class CallingClass {
|
||||||
if (
|
if (
|
||||||
localDeviceState.connectionState === ConnectionState.NotConnected
|
localDeviceState.connectionState === ConnectionState.NotConnected
|
||||||
) {
|
) {
|
||||||
if (localDeviceState.videoMuted) {
|
// NOTE: This assumes that only one call is active at a time. For example, if
|
||||||
this.disableLocalCamera();
|
// there are two calls using the camera, this will disable both of them.
|
||||||
}
|
// That's fine for now, but this will break if that assumption changes.
|
||||||
|
this.disableLocalCamera();
|
||||||
|
|
||||||
delete this.callsByConversation[conversationId];
|
delete this.callsByConversation[conversationId];
|
||||||
} else {
|
} else {
|
||||||
this.callsByConversation[conversationId] = groupCall;
|
this.callsByConversation[conversationId] = groupCall;
|
||||||
|
|
||||||
|
// NOTE: This assumes only one active call at a time. See comment above.
|
||||||
if (localDeviceState.videoMuted) {
|
if (localDeviceState.videoMuted) {
|
||||||
this.disableLocalCamera();
|
this.disableLocalCamera();
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue