Skip to content

Commit c59cc4d

Browse files
committed
2 parents 3b2969b + e4fab78 commit c59cc4d

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

.github/workflows/dart.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
os: [ubuntu-latest]
1616
# os: [ubuntu-latest, windows-latest, macos-latest]
1717
steps:
18-
- uses: actions/checkout@v1
18+
- uses: actions/checkout@v2
1919
- uses: actions/setup-java@v1
2020
with:
2121
java-version: '12.x'

lib/src/rtc_session.dart

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2866,23 +2866,19 @@ class RTCSession extends EventManager {
28662866
}
28672867

28682868
void _toggleMuteAudio(bool mute) {
2869-
List<MediaStream> streams = _connection.getLocalStreams();
2870-
streams.forEach((MediaStream stream) {
2871-
if (stream.getAudioTracks().isNotEmpty) {
2872-
MediaStreamTrack track = stream.getAudioTracks()[0];
2869+
if (_localMediaStream != null) {
2870+
for (MediaStreamTrack track in _localMediaStream.getAudioTracks()) {
28732871
track.enabled = !mute;
28742872
}
2875-
});
2873+
}
28762874
}
28772875

28782876
void _toggleMuteVideo(bool mute) {
2879-
List<MediaStream> streams = _connection.getLocalStreams();
2880-
streams.forEach((MediaStream stream) {
2881-
if (stream.getVideoTracks().isNotEmpty) {
2882-
MediaStreamTrack track = stream.getVideoTracks()[0];
2877+
if (_localMediaStream != null) {
2878+
for (MediaStreamTrack track in _localMediaStream.getVideoTracks()) {
28832879
track.enabled = !mute;
28842880
}
2885-
});
2881+
}
28862882
}
28872883

28882884
void _newRTCSession(String originator, dynamic request) {

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ environment:
77
flutter: ">=1.10.0"
88

99
dependencies:
10-
crypto: ^2.1.3
10+
crypto: ^3.0.0
1111
flutter_webrtc: ^0.5.8
1212
intl: any
1313
logger: ^0.9.0
@@ -16,7 +16,7 @@ dependencies:
1616
random_string: ^2.0.0
1717
recase: ^3.0.0
1818
sdp_transform: ^0.2.0
19-
uuid: ^2.0.2
19+
uuid: ^3.0.2
2020

2121

2222
dev_dependencies:

0 commit comments

Comments
 (0)