8000 Upgrade version to 0.5.3. · next-coder/flutter-webrtc@fdbcdaa · GitHub
[go: up one dir, main page]

Skip to content

Commit fdbcdaa

Browse files
committed
Upgrade version to 0.5.3.
1 parent 7d8aeaf commit fdbcdaa

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Changelog
22

33
--------------------------------------------
4+
[0.5.3] - 2020.11.21
5+
6+
* Fix bug.
7+
48
[0.5.2] - 2020.11.19
59

610
* Improve web code

common/darwin/Classes/FlutterRTCMediaStream.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,12 @@ - (void)getUserVideo:(NSDictionary *)constraints
265265
self._targetHeight = 720;
266266
self._targetFps = 30;
267267

268-
id mandatory = videoConstraints[@"mandatory"];
268+
if (!videoDevice && [constraints[@"video"] boolValue] == YES) {
269+
videoDevice = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];
270+
}
271+
272+
id mandatory = [videoConstraints isKindOfClass:[NSDictionary class]]? videoConstraints[@"mandatory"] : nil ;
273+
269274
// constraints.video.mandatory
270275
if(mandatory && [mandatory isKindOfClass:[NSDictionary class]])
271276
{

lib/src/native/rtc_peerconnection_impl.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,7 @@ class RTCPeerConnectionNative extends RTCPeerConnection {
255255
final response = await _channel
256256
.invokeMethod<Map<dynamic, dynamic>>('createOffer', <String, dynamic>{
257257
'peerConnectionId': _peerConnectionId,
258-
'constraints':
259-
constraints.isEmpty ? defaultSdpConstraints : constraints,
258+
'constraints': constraints ?? defaultSdpConstraints
260259
});
261260

262261
String sdp = response['sdp'];
@@ -274,8 +273,7 @@ class RTCPeerConnectionNative extends RTCPeerConnection {
274273
final response = await _channel.invokeMethod<Map<dynamic, dynamic>>(
275274
'createAnswer', <String, dynamic>{
276275
'peerConnectionId': _peerConnectionId,
277-
'constraints':
278-
constraints.isEmpty ? defaultSdpConstraints : constraints,
276+
'constraints': constraints ?? defaultSdpConstraints
279277
});
280278
String sdp = response['sdp'];
281279
String type = response['type'];

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_webrtc
22
description: Flutter WebRTC plugin for iOS/Android/Destkop/Web, based on GoogleWebRTC.
3-
version: 0.5.2
3+
version: 0.5.3
44
homepage: https://github.com/cloudwebrtc/flutter-webrtc
55
environment:
66
sdk: '>=2.2.2 <3.0.0'

0 commit comments

Comments
 (0)
0