10000 Update example. · model-lib/flutter-webrtc@8fbc8aa · GitHub
[go: up one dir, main page]

Skip to content

Commit 8fbc8aa

Browse files
committed
Update example.
1 parent 62f84a3 commit 8fbc8aa

File tree

7 files changed

+15
-28
lines changed

7 files changed

+15
-28
lines changed

example/android/app/build.gradle

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,6 @@ android {
3636
// TODO: Add your own signing config for the release build.
3737
// Signing with the debug keys for now, so `flutter run --release` works.
3838
signingConfig signingConfigs.debug
39-
40-
// Workaround for https://github.com/flutter/flutter/issues/18494
41-
ndk {
42-
if (!project.hasProperty('target-platform'))
43-
abiFilters 'armeabi-v7a'
44-
else switch (project.property('target-platform')) {
45-
case 'android-arm': abiFilters 'armeabi-v7a'; break
46-
case 'android-arm64': abiFilters 'arm64-v8a'; break
47-
case 'android-x86': abiFilters 'x86'; break
48-
case 'android-x64': abiFilters 'x86_64'; break
49-
default:
50-
throw new GradleException("Unrecognized target-platform: " + project.property('target-platform'))
51-
}
52-
}
5339
}
5440
}
5541

example/android/gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
org.gradle.jvmargs=-Xmx1536M
2+
android.enableR8=true
3+
android.useAndroidX=true
4+
android.enableJetifier=true

example/lib/main.dart

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import 'package:flutter/material.dart';
21
import 'dart:core';
2+
import 'package:flutter/material.dart';
3+
34
import 'src/loopback_sample.dart';
45
import 'src/get_user_media_sample.dart';
56
import 'src/get_display_media_sample.dart';
@@ -13,11 +14,6 @@ class MyApp extends StatefulWidget {
1314
_MyAppState createState() => new _MyAppState();
1415
}
1516

16-
enum DialogDemoAction {
17-
cancel,
18-
connect,
19-
}
20-
2117
class _MyAppState extends State<MyApp> {
2218
List<RouteItem> items;
2319

example/lib/src/get_user_media_sample.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import 'dart:io';
2+
import 'dart:core';
23

34
import 'package:flutter/material.dart';
45
import 'package:flutter_webrtc/webrtc.dart';
5-
import 'dart:core';
66
import 'package:path_provider/path_provider.dart';
77

88
/*

example/lib/src/loopback_sample.dart

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
import 'package:flutter/material.dart';
2-
import 'package:flutter_webrtc/webrtc.dart';
31
import 'dart:core';
42
import 'dart:async';
53

4+
import 'package:flutter/material.dart';
5+
import 'package:flutter_webrtc/webrtc.dart';
6+
7+
68

79
class LoopBackSample extends StatefulWidget {
810

@@ -43,15 +45,15 @@ class _MyAppState extends State<LoopBackSample> {
4345

4446
void handleStatsReport(Timer timer) async {
4547
if (_peerConnection != null) {
46-
List<StatsReport> reports = await _peerConnection.getStats(null);
48+
List<StatsReport> reports = await _peerConnection.getStats();
4749
reports.forEach((report) {
4850
print("report => { ");
4951
print(" id: " + report.id + ",");
5052
print(" type: " + report.type + ",");
5153
print(" timestamp: ${report.timestamp},");
5254
print(" values => {");
5355
report.values.forEach((key, value) {
54-
print(" " + key + " : " + value + ", ");
56+
print(" " + key + " : " + value.toString() + ", ");
5557
});
5658
print(" }");
5759
print("}");

example/lib/src/route_item.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import 'package:flutter/material.dart';
2-
import 'dart:core';
32

43
typedef void RouteCallback(BuildContext context);
54

65
class RouteItem {
76
RouteItem({
87
@required this.title,
9-
@required this.subtitle,
10-
@required this.push,
8+
this.subtitle,
9+
this.push,
1110
});
1211

1312
final String title;

example/pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: webrtc_example
22
description: Demonstrates how to use the webrtc plugin.
3+
version: 1.0.0
34

45
dependencies:
56
flutter:

0 commit comments

Comments
 (0)
0