Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,3 @@
.flutter-plugins-dependencies

ios/Flutter/flutter_export_environment.sh
lib/generated_plugin_registrant.dart
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ Online Demo: https://demo.cloudwebrtc.com:8086/
- `flutter run`
## Note
- If you want to test `P2P Call Sample`, please use the [webrtc-flutter-server](https://github.com/cloudwebrtc/flutter-webrtc-server), and enter your server address into the example app.
## Requirement
- Android NDK 23.2.8568313
- CMake
- Flutter 3.3.0

## screenshots
# iOS
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 28
ndkVersion "21.4.7075529"
compileSdkVersion 31
ndkVersion "23.2.8568313"

lintOptions {
disable 'InvalidPackage'
Expand Down
3 changes: 1 addition & 2 deletions lib/src/call_sample/call_sample.dart
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,7 @@ class _CallSampleState extends State<CallSample> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('P2P Call Sample' +
(_selfId != null ? ' [Your ID ($_selfId)] ' : '')),
title: Text('' + (_selfId != null ? ' [Your ID ($_selfId)] ' : '')),
actions: <Widget>[
IconButton(
icon: const Icon(Icons.settings),
Expand Down
3 changes: 1 addition & 2 deletions lib/src/call_sample/data_channel_sample.dart
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ class _DataChannelSampleState extends State<DataChannelSample> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Data Channel Sample' +
(_selfId != null ? ' [Your ID ($_selfId)] ' : '')),
title: Text('' + (_selfId != null ? ' [Your ID ($_selfId)] ' : '')),
actions: <Widget>[
IconButton(
icon: const Icon(Icons.settings),
Expand Down
2 changes: 1 addition & 1 deletion lib/src/call_sample/signaling.dart
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ class Signaling {
_sessions[sessionId] = newSession;
await newSession.pc?.setRemoteDescription(
RTCSessionDescription(description['sdp'], description['type']));
// await _createAnswer(newSession, media);
if (media == 'data') await _createAnswer(newSession, media);

if (newSession.remoteCandidates.length > 0) {
newSession.remoteCandidates.forEach((candidate) async {
Expand Down
6 changes: 6 additions & 0 deletions macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
import FlutterMacOS
import Foundation

import flutter_webrtc
import path_provider_macos
import shared_preferences_macos

func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FlutterWebRTCPlugin.register(with: registry.registrar(forPlugin: "FlutterWebRTCPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
}
Loading