fix: Fixed issue with group calls for web and flutter.

This commit is contained in:
cloudwebrtc 2022-08-25 10:35:50 +08:00
parent a536a7ea8b
commit 38c37ec168
3 changed files with 6 additions and 9 deletions

View File

@ -82,7 +82,7 @@ class WrappedMediaStream {
Future<void> dispose() async {
renderer.srcObject = null;
if (isLocal() && stream != null) {
if (isLocal() && stream != null && isWeb) {
for (final element in stream!.getTracks()) {
await element.stop();
}

View File

@ -1092,13 +1092,10 @@ class GroupCall {
onStreamRemoved.add(stream);
if (voip.delegate.isWeb) {
stream.stream!.getTracks().forEach((element) {
element.stop();
});
}
stream.dispose();
stream.stream!.dispose();
onGroupCallEvent.add(GroupCallEvent.UserMediaStreamsChanged);

View File

@ -29,7 +29,7 @@ dependencies:
random_string: ^2.3.1
sdp_transform: ^0.3.2
slugify: ^2.0.0
webrtc_interface: ^1.0.1
webrtc_interface: ^1.0.7
dev_dependencies:
coverage: ">=0.15.0 <2.0.0"