Skip to content

Commit b5da459

Browse files
committed
fix hold/unhold, close #302 and close #305.
1 parent 8051ebe commit b5da459

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

example/scripts/project_tools.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function create() {
1717
echo "Create flutter project: name=$FLUTTER_APP_PROJECT_NAME, org=$FLUTTER_APP_ORG ..."
1818
flutter config --enable-macos-desktop
1919
flutter config --enable-web
20-
flutter create --android-language java --androidx --ios-language objc --project-name $FLUTTER_APP_PROJECT_NAME --org $FLUTTER_APP_ORG .
20+
flutter create --android-language java --ios-language objc --project-name $FLUTTER_APP_PROJECT_NAME --org $FLUTTER_APP_ORG .
2121
add_permission_label
2222
else
2323
echo "Project [$FLUTTER_APP_PROJECT_NAME] already exists!"
@@ -37,15 +37,15 @@ function add_permission_label() {
3737
echo ""
3838
echo "Add permission labels to AndroidManifest.xml."
3939
echo ""
40-
python add-line.py -i ../android/app/build.gradle -s 'minSdkVersion 21' -t 'minSdkVersion 32' -r
40+
python add-line.py -i ../android/app/build.gradle -s 'minSdkVersion 16' -t 'minSdkVersion 21' -r
4141
python add-line.py -i ../android/app/src/main/AndroidManifest.xml -s "<application" -t ' <uses-permission android:name="android.permission.CAMERA" />'
4242
python add-line.py -i ../android/app/src/main/AndroidManifest.xml -s "<application" -t ' <uses-permission android:name="android.permission.RECORD_AUDIO" />'
4343
python add-line.py -i ../android/app/src/main/AndroidManifest.xml -s "<application" -t ' <uses-permission android:name="android.permission.WAKE_LOCK" />'
4444
python add-line.py -i ../android/app/src/main/AndroidManifest.xml -s "<application" -t ' <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />'
4545
python add-line.py -i ../android/app/src/main/AndroidManifest.xml -s "<application" -t ' <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />'
4646
python add-line.py -i ../android/app/src/main/AndroidManifest.xml -s "<application" -t ' <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />'
4747
python add-line.py -i ../android/app/src/main/AndroidManifest.xml -s "<application" -t ' <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />'
48-
if [ -d "macos" ]; then
48+
python add-line.py -i ../android/app/src/main/AndroidManifest.xml -s "<application" -t ' <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />'
4949
echo ""
5050
echo "Add permission labels to macOS."
5151
echo ""
@@ -67,7 +67,6 @@ if [ -d "macos" ]; then
6767
python add-line.py -i ../macos/Runner/Release.entitlements -s '</dict>' -t ' <true/>'
6868
python add-line.py -i ../macos/Runner/Release.entitlements -s '</dict>' -t ' <key>com.apple.security.network.client</key>'
6969
python add-line.py -i ../macos/Runner/Release.entitlements -s '</dict>' -t ' <true/>'
70-
fi
7170
}
7271

7372
if [ "$CMD" == "create" ];

lib/src/rtc_session.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1642,7 +1642,7 @@ class RTCSession extends EventManager implements Owner {
16421642
Future<RTCSessionDescription> _createLocalDescription(
16431643
String type, Map<String, dynamic>? constraints) async {
16441644
logger.debug('createLocalDescription()');
1645-
_iceGatheringState = RTCIceGatheringState.RTCIceGatheringStateNew;
1645+
_iceGatheringState ??= RTCIceGatheringState.RTCIceGatheringStateNew;
16461646
Completer<RTCSessionDescription> completer =
16471647
Completer<RTCSessionDescription>();
16481648

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ environment:
88

99
dependencies:
1010
crypto: ^3.0.0
11-
flutter_webrtc: ^0.8.2
11+
flutter_webrtc: ^0.9.1
1212
intl: ^0.17.0
1313
logger: ^1.0.0
1414
parser_error: ^0.2.0

0 commit comments

Comments
 (0)