agora_flutter_webrtc 0.0.3

Agora_Flutter_WebRTC #

Agora Flutter WebRTC is a real-time audio/video plugin based on Flutter WebRTC. It implements the major functions provided by the Agora Web SDK.

Usage #

Add flutter_webrtc as a dependency in your pubspec.yaml file.

Getting Started #

  • See the example directory for a sample app using Agora_Flutter_WebRTC.
  • Or check out this tutorial for a simple video call app using the Agora_Flutter_WebRTC.

iOS #

Add the following entry to your Info.plist file, located in <project root>/ios/Runner/Info.plist:

<string>$(PRODUCT_NAME) Camera Usage!</string>
<string>$(PRODUCT_NAME) Microphone Usage!</string>

use the following line in the ios/Podfile file.

platform :ios, '9.0'

Android #

Ensure the following permission is present in your Android Manifest file, located in `

    <uses-permission android:name="android.permission.INTERNET"/>

    <uses-feature android:name="" />
    <uses-feature android:name="" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

Also you will need to set your build settings to Java 8, because official WebRTC jar now uses static methods in EglBase interface. Just add this to your app level build.gradle:

android {
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8

Ensure that minSdkVersion is 18 or higher in build.gradle.

 defaultConfig {
        applicationId "com.example.agora_flutter_webrtc_quickstart"
        minSdkVersion 18 
        targetSdkVersion 28
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        testInstrumentationRunner ""

0.0.1 #

  • TODO: Describe initial release.


agora_flutter_webrtc_example #

Agora Flutter WebRTC QuickStart

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  agora_flutter_webrtc: ^0.0.3

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:agora_flutter_webrtc/agora_flutter_webrtc.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Feb 13, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.7

Health suggestions

Fix lib/src/core/choose_server.dart. (-1 points)

Analysis of lib/src/core/choose_server.dart reported 2 hints:

line 169 col 11: The value of the local variable 'url' isn't used.

line 170 col 11: The value of the local variable 'reason' isn't used.

Fix lib/src/core/peerconnection.dart. (-0.50 points)

Analysis of lib/src/core/peerconnection.dart reported 1 hint:

line 46 col 9: Don't explicitly initialize variables to null.

Fix lib/src/utils/index.dart. (-0.50 points)

Analysis of lib/src/utils/index.dart reported 1 hint:

line 1 col 8: Unused import: 'dart:math'.

Fix additional 10 files with analysis or formatting issues. (-0.50 points)

Additional issues in the following files:

  • lib/src/utils/report.dart (1 hint)
  • lib/agora_client.dart (Run flutter format to format lib/agora_client.dart.)
  • lib/agora_flutter_webrtc.dart (Run flutter format to format lib/agora_flutter_webrtc.dart.)
  • lib/agora_stream.dart (Run flutter format to format lib/agora_stream.dart.)
  • lib/agora_view.dart (Run flutter format to format lib/agora_view.dart.)
  • lib/src/core/error_code.dart (Run flutter format to format lib/src/core/error_code.dart.)
  • lib/src/core/exception.dart (Run flutter format to format lib/src/core/exception.dart.)
  • lib/src/core/peerconnection_controller.dart (Run flutter format to format lib/src/core/peerconnection_controller.dart.)
  • lib/src/core/signal.dart (Run flutter format to format lib/src/core/signal.dart.)
  • lib/src/utils/logger.dart (Run flutter format to format lib/src/utils/logger.dart.)

Maintenance issues and suggestions

Support latest dependencies. (-30 points)

The version constraint in pubspec.yaml does not support the latest published versions for 3 dependencies (flutter_webrtc, http, uuid).

Homepage URL doesn't exist. (-20 points)

At the time of the analysis the homepage field was unreachable.

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
flutter_webrtc 0.1.7 0.1.7 0.2.6
http 0.11.3+17 0.11.3+17 0.12.0+4
uuid 2.0.1 2.0.1 2.0.4
Transitive dependencies
async 2.4.0
charcode 1.1.3
collection 1.14.11 1.14.12
convert 2.1.1
crypto 2.1.4
http_parser 3.1.3
meta 1.1.8
path 1.6.4
sky_engine 0.0.99
source_span 1.6.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies