fix: fixed camera is still active after leaving the group call.
This commit is contained in:
parent
f3c1eda97f
commit
425274cb9c
|
|
@ -400,13 +400,16 @@ class CallSession {
|
|||
}
|
||||
|
||||
Future<void> initWithInvite(CallType type, RTCSessionDescription offer,
|
||||
SDPStreamMetadata? metadata, int lifetime) async {
|
||||
SDPStreamMetadata? metadata, int lifetime, bool isGroupCall) async {
|
||||
await _preparePeerConnection();
|
||||
|
||||
/// only add local stream if it is not a group call.
|
||||
if (!isGroupCall) {
|
||||
final stream = await _getUserMedia(type);
|
||||
if (stream != null) {
|
||||
addLocalStream(stream, SDPStreamMetadataPurpose.Usermedia);
|
||||
}
|
||||
}
|
||||
|
||||
if (metadata != null) {
|
||||
_updateRemoteSDPStreamMetadata(metadata);
|
||||
|
|
|
|||
|
|
@ -197,7 +197,8 @@ class VoIP {
|
|||
content['offer']['type'],
|
||||
);
|
||||
await newCall
|
||||
.initWithInvite(callType, offer, sdpStreamMetadata, lifetime)
|
||||
.initWithInvite(
|
||||
callType, offer, sdpStreamMetadata, lifetime, confId != null)
|
||||
.then((_) {
|
||||
// Popup CallingPage for incoming call.
|
||||
if (!delegate.isBackgroud && confId == null) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue