This README introduces ConnectyCube P2P Calls code sample for Flutter
The project contains the following features implemented:
- User authorization
- Group video/audio calls (up to 4 users)
- Mute/unmute microphone
- Switch cameras
- Disable/enable the video stream
- Switch speakerphone and earpiece
- Opponents' Mic level monitoring
- Opponents' Video bitrate monitoring
- Screen Sharing
- Background calls (via push notifications)
ConnectyCube Flutter getting started - https://developers.connectycube.com/flutter
ConnectyCube P2P Calls API documentation - https://developers.connectycube.com/flutter/videocalling
Prepare environment for Flutter and clone the project.
Replace vars in config file lib/src/config.dart
REPLACE_APP_ID
REPLACE_APP_AUTH_KEY
REPLACE_APP_AUTH_SECRET
REPLACE_USER_{1/2/3/4}_{LOGIN/FULL_NAME/PASSWORD}
- Right mouse button click on
main.dart
- Chose 'Run 'main.dart''
The app will automatically run on your Android device.
cd ios
pod install
- Open
Runner.xcworkspace
fromios
dir - Run project
The app will automatically run on a selected iOS device or simulator.
- Run command from the Terminal
flutter run -d macos
- Run command from the Terminal
flutter run -d windows
- Run command from the Terminal
flutter run -d chrome
- Run command from the Terminal
flutter run -d linux
For notifying mobile platforms we use Connectycube Push notifications feature and own Connectycube Call Kit plugin for supporting Call Kit feature.
- Create your own app in the ConnectyCube admin panel (if not created yet);
- Create a project in the Firebase developer console (if not created yet);
- Add the Server API key from the Firebase developer console to the ConnectyCube admin panel for the Android platform (short guide);
- Add Apple certificate for the iOS platform (short guide, how to generate and set it to the admin panel). But instead of an APNS certificate, you should choose a VoIP certificate;
- Add
google-services.json
file from the Firebase developer console to the Android app by pathp2p_call_sample/android/app/
- Configure file
p2p_call_sample/lib/src/utils/configs.dart
with your endpoints from the 1st. point of this guide; - Create users in the ConnectyCube admin panel and add them to the configure file
p2p_call_sample/lib/src/utils/configs.dart
- Build and run the app as usual;
Got troubles with building Flutter code samples? Create an issue at Issues page