|
| 1 | +// ignore_for_file: deprecated_member_use_from_same_package |
| 2 | + |
1 | 3 | import 'dart:async';
|
2 | 4 |
|
3 | 5 | import 'package:meta/meta.dart';
|
@@ -265,11 +267,6 @@ class Call {
|
265 | 267 | _connectOptions = connectOptions;
|
266 | 268 | }
|
267 | 269 |
|
268 |
| - // This is only used in [_onStateChanged] to determine the difference between |
269 |
| - // the previous and current state. It should not be used for any other |
270 |
| - // purpose. It is not guaranteed to be the latest, Use [state] instead. |
271 |
| - CallState? _prevState; |
272 |
| - |
273 | 270 | void _observeState() {
|
274 | 271 | _subscriptions.add(
|
275 | 272 | _idState,
|
@@ -313,8 +310,6 @@ class Call {
|
313 | 310 | state.settings.audio.opusDtxEnabled;
|
314 | 311 | _sessionFactory.sdpEditor.opusRedEnabled =
|
315 | 312 | state.settings.audio.redundantCodingEnabled;
|
316 |
| - |
317 |
| - _prevState = state; |
318 | 313 | }
|
319 | 314 |
|
320 | 315 | Future<void> _onCoordinatorEvent(CoordinatorCallEvent event) async {
|
@@ -530,7 +525,6 @@ class Call {
|
530 | 525 | }
|
531 | 526 |
|
532 | 527 | Future<Result<CallCredentials>> _joinIfNeeded() async {
|
533 |
| - final state = this.state.value; |
534 | 528 | final creds = _credentials;
|
535 | 529 | if (creds != null) {
|
536 | 530 | _logger.w(() => '[joinIfNeeded] rejected (already joined): $creds');
|
@@ -605,8 +599,10 @@ class Call {
|
605 | 599 | _stateManager
|
606 | 600 | .lifecycleCallConnectingAction(CallConnecting(_reconnectAttempt));
|
607 | 601 | if (_status.value == _ConnectionStatus.disconnected) {
|
608 |
| - _logger.w(() => |
609 |
| - '[reconnect] attempt($_reconnectAttempt) rejected (disconnected)'); |
| 602 | + _logger.w( |
| 603 | + () => |
| 604 | + '[reconnect] attempt($_reconnectAttempt) rejected (disconnected)', |
| 605 | + ); |
610 | 606 | _logger.v(() => '[reconnect] <<<<<<<<<<<<<<< rejected');
|
611 | 607 | return;
|
612 | 608 | }
|
@@ -947,9 +943,6 @@ class Call {
|
947 | 943 |
|
948 | 944 | /// Allows you to create a new call with the given parameters
|
949 | 945 | /// and joins the call immediately.
|
950 |
| - /// |
951 |
| - /// If a call with the same [cid] already exists, |
952 |
| - /// it will join the existing call. |
953 | 946 | Future<Result<CallJoinedData>> _joinCall({
|
954 | 947 | bool create = false,
|
955 | 948 | }) async {
|
@@ -1046,7 +1039,9 @@ class Call {
|
1046 | 1039 |
|
1047 | 1040 | if (result.isSuccess) {
|
1048 | 1041 | _stateManager.setCallBroadcasting(
|
1049 |
| - isBroadcasting: true, hlsPlaylistUrl: result.getDataOrNull()); |
| 1042 | + isBroadcasting: true, |
| 1043 | + hlsPlaylistUrl: result.getDataOrNull(), |
| 1044 | + ); |
1050 | 1045 | }
|
1051 | 1046 | return result;
|
1052 | 1047 | }
|
|
0 commit comments