Skip to content

EffectsSDK/flutter-webrtc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flutter-WebRTC with Video Effects SDK

This repository contains the fork of Flutter-WebRTC with Video Effects SDK integration. Video Effects SDK has built-in real-time AI video enhancements that makes video meeting experience more effective and comfortable to your application.

This fork adds functional of Video Effects SDK into Flutter-WebRTC API and you can easily use it. Video Effects SDK has effect only when enabled, the SDK applies enhancements to frames in local video stream, else is the same as original flutter-webrtc.

Supported platforms:

  • Android
  • iOS

How to use

  1. Add git url into your dependencies. If original Flutter-WebRTC is already used, replace it with this fork.

pubspec.yaml

dependencies:
  flutter-webrtc:
    git:
      url: https://github.com/EffectsSDK/flutter-webrtc.git
  1. Add effectsSdkRequired flag to your getUserMedia request
final mediaConstraints = <String, dynamic>{
  'audio': false,
  'video': {
    'mandatory': {
      'minWidth': '640',
      'minHeight': '480',
      'minFrameRate': '30',
    },
    'facingMode': 'user',
    'effectsSdkRequired': true,
    'optional': [],
  }
};
var stream = await navigator.mediaDevices.getUserMedia(mediaConstraints);
  1. Call EffectsSDK methods by using VideoEffectsSdk
var status = await VideoEffectsSdk.auth(stream.getVideoTracks().first, 'YOUR_CUSTOMER_ID');
switch (status) {
    case AuthStatus.active:
    await VideoEffectsSdk.setPipelineMode(stream.getVideoTracks().first, PipelineMode.blur);
    await VideoEffectsSdk.setBlurPower(stream.getVideoTracks().first, 0.6);
    case AuthStatus.expired:
    // TODO: Handle this case.
    case AuthStatus.inactive:
    // TODO: Handle this case.
    case AuthStatus.unavailable:
    // TODO: Handle this case.
}

Effects SDK API

Read about Effects SDK API you can on the
Effects SDK integration API Reference

Technical details

Effects SDK included by using custom CameraVideoCapturer instance for Effects SDK camera pipeline( android). You can modify our solution as you need or try another way for integration (for example with custom VideoProcessor). Also you can replace CameraPipeline to lite version of it.

Additional links

  1. Platform documentation (iOS, android)
  2. Effects SDK site

About

WebRTC plugin for Flutter Mobile/Desktop/Web

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 27.3%
  • C++ 26.7%
  • Objective-C 24.5%
  • Dart 16.5%
  • CMake 2.3%
  • Kotlin 1.7%
  • Other 1.0%