8000 Merge remote-tracking branch 'flutter-webrtc/unified-plan' into unifi… · next-coder/flutter-webrtc@3f15ce9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3f15ce9

Browse files
committed
Merge remote-tracking branch 'flutter-webrtc/unified-plan' into unified-plan
2 parents 655b24b + 0d7a91a commit 3f15ce9

File tree

233 files changed

+20430
-2807
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

233 files changed

+20430
-2807
lines changed

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These are supported funding model platforms
2+
open_collective: flutter-webrtc
3+
custom: ['https://www.paypal.me/duanweiwei']

CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,42 @@
11
## Changelog
2+
23
--------------------------------------------
4+
5+
[0.2.6] - 2020.02.03
6+
7+
* Fixed the interruption of the Bluetooth headset that was playing music after the plugin started.
8+
9+
[0.2.4] - 2020.02.03
10+
11+
* Fixed bug.
12+
13+
[0.2.3] - 2020.02.03
14+
15+
* Fixed bug for enableSpeakerphone (Android/iOS).
16+
* Fix RtcVideoView not rebuild when setState called and renderer is changed.
17+
* Fix Android frame orientation.
18+
19+
[0.2.2] - 2019.12.13
20+
21+
* Removed the soft link of WebRTC.framework to fix compile errors of macos version when third-party flutter app depends on plugins
22+
23+
[0.2.1] - 2019.12.12
24+
25+
* Code format.
26+
* Remove unused files.
27+
28+
[0.2.0] - 2019.12.12
29+
30+
* Add support for macOS (channel dev).
31+
* Add support for Flutter Web (channel dev).
32+
* Add hasTorch support for Android (Camera2 API) and iOS.
33+
* Fix(PeerConnections) split dispose and close
34+
* Add microphone mute support for Android/iOS.
35+
* Add enable speakerphone support for Android/iOS.
36+
* Fix 'createIceServer' method Invalid value error (Android).
37+
* Store SignalingState/IceGatheringState/IceConnectionState in RTCPeerConnection.
38+
* Fixed rendering issues caused by remote MediaStream using the same msid/label when using multiple PeerConntions.
39+
340
[0.1.7] - 2019.05.16
441

542
* Add RTCDataChannelMessage for data channel and remove base64 type.

CONTRIBUTING.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Contributing
2+
3+
We love contributions from everyone, whether it's raising an issue, reporting a bug, adding a feature, or helping improve a document.
4+
Maintaining the flutter-webrtc plugin for all platforms is not an easy task, so everything you do is support for the project.
5+
6+
# Pull Request
7+
We recommend that you create a related issue before PR so that others can find the answers they want in the issues.

README.md

Lines changed: 42 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
# Flutter-WebRTC
2-
[![pub package](https://img.shields.io/pub/v/flutter_webrtc.svg)](https://pub.dartlang.org/packages/flutter_webrtc) [![Join the chat at https://gitter.im/flutter-webrtc/Lobby](https://badges.gitter.im/flutter-webrtc/Lobby.svg)](https://gitter.im/flutter-webrtc/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
2+
[![Financial Contributors on Open Collective](https://opencollective.com/flutter-webrtc/all/badge.svg?label=financial+contributors)](https://opencollective.com/flutter-webrtc) [![pub package](https://img.shields.io/pub/v/flutter_webrtc.svg)](https://pub.dartlang.org/packages/flutter_webrtc) [![Gitter](https://badges.gitter.im/flutter-webrtc/Lobby.svg)](https://gitter.im/flutter-webrtc/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
33

4-
Flutter WebRTC plugin for iOS/Android
4+
WebRTC plugin for Flutter Mobile/Desktop/Web
5+
6+
## Functionality
7+
| Feature | Android | iOS | [Web](https://flutter.dev/web) | macOS | Windows | Linux | [Fuchsia](https://fuchsia.googlesource.com/) |
8+
| :-------------: | :-------------:| :-----: | :-----: | :-----: | :-----: | :-----: | :-----: |
9+
| Audio/Video | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | [WIP] | [WIP] | |
10+
| Data Channel | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | [WIP] | [WIP] | |
11+
| Screen Capture | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | | |
12+
| Unified-Plan | | | | | | | |
13+
| MediaRecorder| :warning: | :warning: | :heavy_check_mark: | | | | |
514

615
## Usage
716
Add `flutter_webrtc` as a [dependency in your pubspec.yaml file](https://flutter.io/using-packages/).
@@ -21,7 +30,7 @@ This entry allows your app to access camera and microphone.
2130

2231
### Android
2332

24-
Ensure the following permission is present in your Android Manifest file, located in `<project root>/android/app/src/main/AndroidManifest.xml:
33+
Ensure the following permission is present in your Android Manifest file, located in `<project root>/android/app/src/main/AndroidManifest.xml`:
2534

2635
```xml
2736
<uses-feature android:name="android.hardware.camera" />
@@ -46,125 +55,40 @@ android {
4655
}
4756
```
4857

49-
## Functionality
50-
We intend to implement support the following features:
51-
52-
- [X] Data Channel
53-
- [ ] Port to [Flutter-Desktop-Embedding](https://github.com/google/flutter-desktop-embedding)
54-
- [X] Screen Capture (iOS/Android)
55-
- [ ] ORTC API
56-
- [ ] Support [Fuchsia](https://fuchsia.googlesource.com/)
57-
- [ ] MediaRecorder
58-
- [ ] Flutter Web
58+
## Contributing
59+
The project is inseparable from the contributors of the community.
60+
- [CloudWebRTC](https://github.com/cloudwebrtc) - Original Author
61+
- [RainwayApp](https://github.com/rainwayapp) - Sponsor from Paypal
5962

6063
### Example
64+
For more examples, please refer to [flutter-webrtc-demo](https://github.com/cloudwebrtc/flutter-webrtc-demo/).
6165

62-
```dart
63-
import 'package:flutter/material.dart';
64-
import 'package:flutter_webrtc/webrtc.dart';
65-
import 'dart:core';
66+
## Contributors
6667

67-
/**
68-
* getUserMedia sample
69-
*/
70-
class GetUserMediaSample extends StatefulWidget {
71-
static String tag = 'get_usermedia_sample';
68+
### Code Contributors
7269

73-
@override
74-
_GetUserMediaSampleState createState() => new _GetUserMediaSampleState();
75-
}
70+
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
71+
<a href="https://github.com/cloudwebrtc/flutter-webrtc/graphs/contributors"><img src="https://opencollective.com/flutter-webrtc/contributors.svg?width=890&button=false" /></a>
7672

77-
class _GetUserMediaSampleState extends State<GetUserMediaSample> {
78-
MediaStream _localStream;
79-
final _localRenderer = new RTCVideoRenderer();
80-
bool _inCalling = false;
81-
82-
@override
83-
initState() {
84-
super.initState();
85-
initRenderers();
86-
}
87-
88-
@override
89-
deactivate() {
90-
super.deactivate();
91-
if (_inCalling) {
92-
_hangUp();
93-
}
94-
}
95-
96-
initRenderers() async {
97-
await _localRenderer.initialize();
98-
}
99-
100-
// Platform messages are asynchronous, so we initialize in an async method.
101-
_makeCall() async {
102-
final Map<String, dynamic> mediaConstraints = {
103-
"audio": true,
104-
"video": {
105-
"mandatory": {
106-
"minWidth":'640', // Provide your own width, height and frame rate here
107-
"minHeight": '480',
108-
"minFrameRate": '30',
109-
},
110-
"facingMode": "user",
111-
"optional": [],
112-
}
113-
};
114-
115-
try {
116-
var stream = await navigator.getUserMedia(mediaConstraints);
117-
_localStream = stream;
118-
_localRenderer.srcObject = _localStream;
119-
} catch (e) {
120-
print(e.toString());
121-
}
122-
if (!mounted) return;
123-
124-
setState(() {
125-
_inCalling = true;
126-
});
127-
}
128-
129-
_hangUp() async {
130-
try {
131-
await _localStream.dispose();
132-
_localRenderer.srcObject = null;
133-
} catch (e) {
134-
print(e.toString());
135-
}
136-
setState(() {
137-
_inCalling = false;
138-
});
139-
}
140-
141-
@override
142-
Widget build(BuildContext context) {
143-
return new Scaffold(
144-
appBar: new AppBar(
145-
title: new Text('GetUserMedia API Test'),
146-
),
147-
body: new OrientationBuilder(
148-
builder: (context, orientation) {
149-
return new Center(
150-
child: new Container(
151-
margin: new EdgeInsets.fromLTRB(0.0, 0.0, 0.0, 0.0),
152-
width: MediaQuery.of(context).size.width,
153-
height: MediaQuery.of(context).size.height,
154-
child: RTCVideoView(_localRenderer),
155-
decoration: new BoxDecoration(color: Colors.black54),
156-
),
157-
);
158-
},
159-
),
160-
floatingActionButton: new FloatingActionButton(
161-
onPressed: _inCalling ? _hangUp : _makeCall,
162-
tooltip: _inCalling ? 'Hangup' : 'Call',
163-
child: new Icon(_inCalling ? Icons.call_end : Icons.phone),
164-
),
165-
);
166-
}
167-
}
168-
```
73+
### Financial Contributors
16974

170-
For more examples, please refer to [flutter-webrtc-demo](https://github.com/cloudwebrtc/flutter-webrtc-demo/).
75+
Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/flutter-webrtc/contribute)]
76+
77+
#### Individuals
78+
79+
<a href="https://opencollective.com/flutter-webrtc"><img src="https://opencollective.com/flutter-webrtc/individuals.svg?width=890"></a>
80+
81+
#### Organizations
82+
83+
Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/flutter-webrtc/contribute)]
84+
85+
<a href="https://opencollective.com/flutter-webrtc/organization/0/website"><img src="https://opencollective.com/flutter-webrtc/organization/0/avatar.svg"></a>
86+
<a href="https://opencollective.com/flutter-webrtc/organization/1/website"><img src="https://opencollective.com/flutter-webrtc/organization/1/avatar.svg"></a>
87+
<a href="https://opencollective.com/flutter-webrtc/organization/2/website"><img src="https://opencollective.com/flutter-webrtc/organization/2/avatar.svg"></a>
88+
<a href="https://opencollective.com/flutter-webrtc/organization/3/website"><img src="https://opencollective.com/flutter-webrtc/organization/3/avatar.svg"></a>
89+
<a href="https://opencollective.com/flutter-webrtc/organization/4/website"><img src="https://opencollective.com/flutter-webrtc/organization/4/avatar.svg"></a>
90+
<a href="https://opencollective.com/flutter-webrtc/organization/5/website"><img src="https://opencollective.com/flutter-webrtc/organization/5/avatar.svg"></a>
91+
<a href="https://opencollective.com/flutter-webrtc/organization/6/website"><img src="https://opencollective.com/flutter-webrtc/organization/6/avatar.svg"></a>
92+
<a href="https://opencollective.com/flutter-webrtc/organization/7/website"><img src="https://opencollective.com/flutter-webrtc/organization/7/avatar.svg"></a>
93+
<a href="https://opencollective.com/flutter-webrtc/organization/8/website"><img src="https://opencollective.com/flutter-webrtc/organization/8/avatar.svg"></a>
94+
<a href="https://opencollective.com/flutter-webrtc/organization/9/website"><img src="https://opencollective.com/flutter-webrtc/organization/9/avatar.svg"></a>

0 commit comments

Comments
 (0)
0