├── android
├── settings_aar.gradle
├── app
│ ├── proguard-rules.pro
│ ├── src
│ │ ├── main
│ │ │ ├── ic_launcher-playstore.png
│ │ │ ├── res
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ ├── ic_launcher_round.png
│ │ │ │ │ └── ic_launcher_foreground.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ ├── ic_launcher_round.png
│ │ │ │ │ └── ic_launcher_foreground.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ ├── ic_launcher_round.png
│ │ │ │ │ └── ic_launcher_foreground.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ ├── ic_launcher_round.png
│ │ │ │ │ └── ic_launcher_foreground.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ ├── ic_launcher_round.png
│ │ │ │ │ └── ic_launcher_foreground.png
│ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ │ ├── ic_launcher.xml
│ │ │ │ │ └── ic_launcher_round.xml
│ │ │ │ ├── drawable
│ │ │ │ │ ├── launch_background.xml
│ │ │ │ │ └── ic_launcher_background.xml
│ │ │ │ └── values
│ │ │ │ │ └── styles.xml
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── madankumar
│ │ │ │ │ └── video_conferening_mobile
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── AndroidManifest.xml
│ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ └── profile
│ │ │ └── AndroidManifest.xml
│ └── build.gradle
├── gradle.properties
├── .gitignore
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
├── settings.gradle
└── build.gradle
├── ios
├── Flutter
│ ├── Debug.xcconfig
│ ├── Release.xcconfig
│ └── AppFrameworkInfo.plist
├── Runner
│ ├── Runner-Bridging-Header.h
│ ├── Assets.xcassets
│ │ ├── LaunchImage.imageset
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ ├── README.md
│ │ │ └── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-83.5x83.5@2x.png
│ │ │ └── Contents.json
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ └── Info.plist
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── WorkspaceSettings.xcsettings
│ │ └── IDEWorkspaceChecks.plist
├── Runner.xcodeproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── WorkspaceSettings.xcsettings
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── xcshareddata
│ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ └── project.pbxproj
└── .gitignore
├── lib
├── sdk
│ ├── message_format.dart
│ ├── message_payload.dart
│ ├── connection.dart
│ ├── transport.dart
│ ├── peer_connection.dart
│ ├── payload_data.dart
│ └── meeting.dart
├── pojo
│ └── meeting_detail.dart
├── util
│ └── user.util.dart
├── service
│ └── meeting_api.dart
├── widget
│ ├── button.dart
│ ├── actions_button.dart
│ ├── remote_video_page_view.dart
│ ├── control_panel.dart
│ └── remote_connection.dart
├── main.dart
└── screen
│ ├── join_screen.dart
│ ├── chat_screen.dart
│ ├── home_screen.dart
│ └── meeting_screen.dart
├── .metadata
├── README.md
├── .gitignore
├── test
└── widget_test.dart
├── pubspec.yaml
└── pubspec.lock
/android/settings_aar.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | ## Flutter WebRTC
2 | -keep class com.cloudwebrtc.webrtc.** { *; }
3 | -keep class org.webrtc.** { *; }
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.enableR8=true
3 | android.useAndroidX=true
4 | android.enableJetifier=true
5 |
--------------------------------------------------------------------------------
/lib/sdk/message_format.dart:
--------------------------------------------------------------------------------
1 | class MessageFormat {
2 | String userId;
3 | String text;
4 |
5 | MessageFormat({this.userId, this.text});
6 | }
7 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
--------------------------------------------------------------------------------
/android/app/src/main/ic_launcher-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/android/app/src/main/ic_launcher-playstore.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jmadankumar/video-conferencing-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/madankumar/video_conferening_mobile/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.madankumar.video_conferening_mobile
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/lib/sdk/message_payload.dart:
--------------------------------------------------------------------------------
1 | class MessagePayload {
2 | String type;
3 | dynamic data;
4 |
5 | MessagePayload({this.type, this.data});
6 |
7 | factory MessagePayload.fromJson(dynamic json) {
8 | return MessagePayload(type: json['type'], data: json['data']);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
7 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 8af6b2f038c1172e61d418869363a28dffec3cb4
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/lib/pojo/meeting_detail.dart:
--------------------------------------------------------------------------------
1 | class MeetingDetail {
2 | String id;
3 | String hostId;
4 | String hostName;
5 |
6 | MeetingDetail({this.id, this.hostId, this.hostName});
7 |
8 | factory MeetingDetail.fromJson(dynamic json) {
9 | return MeetingDetail(
10 | id: json['id'],
11 | hostId: json['hostId'],
12 | hostName: json['hostName'],
13 | );
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/lib/util/user.util.dart:
--------------------------------------------------------------------------------
1 | import 'package:uuid/uuid.dart';
2 | import 'package:shared_preferences/shared_preferences.dart';
3 |
4 | var uuid = Uuid();
5 |
6 | Future loadUserId() async {
7 | SharedPreferences preferences = await SharedPreferences.getInstance();
8 | var userId;
9 | if (preferences.containsKey('userId')) {
10 | userId = preferences.getString('userId');
11 | } else {
12 | userId = uuid.v4();
13 | preferences.setString('userId', userId);
14 | }
15 | return userId;
16 | }
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # video_conferening_mobile
2 |
3 | A video conferencing mobile app using flutter, webrtc and websocket
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
13 |
14 | For help getting started with Flutter, view our
15 | [online documentation](https://flutter.dev/docs), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | *.mode1v3
2 | *.mode2v3
3 | *.moved-aside
4 | *.pbxuser
5 | *.perspectivev3
6 | **/*sync/
7 | .sconsign.dblite
8 | .tags*
9 | **/.vagrant/
10 | **/DerivedData/
11 | Icon?
12 | **/Pods/
13 | **/.symlinks/
14 | profile
15 | xcuserdata
16 | **/.generated/
17 | Flutter/App.framework
18 | Flutter/Flutter.framework
19 | Flutter/Flutter.podspec
20 | Flutter/Generated.xcconfig
21 | Flutter/app.flx
22 | Flutter/app.zip
23 | Flutter/flutter_assets/
24 | Flutter/flutter_export_environment.sh
25 | ServiceDefinitions.json
26 | Runner/GeneratedPluginRegistrant.*
27 |
28 | # Exceptions to above rules.
29 | !default.mode1v3
30 | !default.mode2v3
31 | !default.pbxuser
32 | !default.perspectivev3
33 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | include ':app'
6 |
7 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
8 | def properties = new Properties()
9 |
10 | assert localPropertiesFile.exists()
11 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
12 |
13 | def flutterSdkPath = properties.getProperty("flutter.sdk")
14 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
15 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
16 |
--------------------------------------------------------------------------------
/lib/sdk/connection.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_webrtc/media_stream.dart';
2 | import 'package:video_conferening_mobile/sdk/peer_connection.dart';
3 |
4 | class Connection extends PeerConnection {
5 | String userId;
6 | String connectionType;
7 | String name;
8 | bool videoEnabled = true;
9 | bool audioEnabled = true;
10 |
11 | Connection(
12 | {this.userId,
13 | this.connectionType,
14 | this.name,
15 | this.audioEnabled,
16 | this.videoEnabled,
17 | MediaStream stream})
18 | : super(localStream: stream);
19 |
20 | void toggleVideo(bool val) {
21 | videoEnabled = val;
22 | }
23 |
24 | void toggleAudio(bool val) {
25 | audioEnabled = val;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.3.50'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:3.5.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | jcenter()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | task clean(type: Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/lib/service/meeting_api.dart:
--------------------------------------------------------------------------------
1 | import 'package:http/http.dart' as http;
2 | import 'package:video_conferening_mobile/util/user.util.dart';
3 |
4 | final String MEETING_API_URL = '/meeting';
5 | // final String MEETING_API_URL = 'http://10.0.2.2:8081/meeting';
6 |
7 | Future startMeeting() async {
8 | var userId = await loadUserId();
9 | var response =
10 | await http.post('$MEETING_API_URL/start', body: {'userId': userId});
11 | return response;
12 | }
13 |
14 | Future joinMeeting(String meetingId) async {
15 | var response = await http.get('$MEETING_API_URL/join?meetingId=$meetingId');
16 | if (response.statusCode >= 200 && response.statusCode < 400) {
17 | return response;
18 | }
19 | throw UnsupportedError('Not a valid meeting');
20 | }
21 |
--------------------------------------------------------------------------------
/lib/widget/button.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class Button extends StatelessWidget {
4 | final String text;
5 | final Function onPressed;
6 |
7 | Button({this.text, this.onPressed});
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | return Container(
12 | margin: EdgeInsets.only(bottom: 20.0),
13 | child: ButtonTheme(
14 | minWidth: 300.0,
15 | height: 48.0,
16 | child: RaisedButton(
17 | onPressed: this.onPressed,
18 | child: Text(
19 | this.text,
20 | style: TextStyle(
21 | color: Colors.white,
22 | fontSize: 20.0,
23 | ),
24 | ),
25 | color: Colors.green,
26 | ),
27 | ),
28 | );
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/lib/widget/actions_button.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class ActionButton extends StatelessWidget {
4 | final VoidCallback onPressed;
5 | final Color color;
6 | final String text;
7 |
8 | ActionButton({this.onPressed, this.color, @required this.text});
9 |
10 | @override
11 | Widget build(BuildContext context) {
12 | return Container(
13 | child: RaisedButton(
14 | onPressed: onPressed,
15 | child: Text(
16 | text,
17 | style: TextStyle(color: Colors.white),
18 | ),
19 | color: color ?? Colors.green,
20 | shape: RoundedRectangleBorder(
21 | borderRadius: BorderRadius.circular(6.0),
22 | side: BorderSide(color: color ?? Colors.green)),
23 | ),
24 | padding: EdgeInsets.all(10.0),
25 | );
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | .dart_tool/
26 | .flutter-plugins
27 | .flutter-plugins-dependencies
28 | .packages
29 | .pub-cache/
30 | .pub/
31 | /build/
32 |
33 | # Web related
34 | lib/generated_plugin_registrant.dart
35 |
36 | # Symbolication related
37 | app.*.symbols
38 |
39 | # Obfuscation related
40 | app.*.map.json
41 |
42 | # Exceptions to above rules.
43 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
44 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:video_conferening_mobile/screen/home_screen.dart';
3 | import 'package:video_conferening_mobile/screen/meeting_screen.dart';
4 |
5 | void main() {
6 | runApp(MyApp());
7 | }
8 |
9 | class MyApp extends StatelessWidget {
10 | // This widget is the root of your application.
11 | @override
12 | Widget build(BuildContext context) {
13 | return MaterialApp(
14 | title: 'Meet X',
15 | theme: ThemeData(
16 | primarySwatch: Colors.green,
17 | visualDensity: VisualDensity.adaptivePlatformDensity,
18 | ),
19 | home: HomeScreen(
20 | title: 'Home',
21 | ),
22 | // initialRoute: '/',
23 | // routes: {
24 | // '/': (context) => HomeScreen(title: 'Home'),
25 | // '/meeting': (context) => MeetingScreen(),
26 | // },
27 | );
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | //
3 | // To perform an interaction with a widget in your test, use the WidgetTester
4 | // utility that Flutter provides. For example, you can send tap and scroll
5 | // gestures. You can also use WidgetTester to find child widgets in the widget
6 | // tree, read text, and verify that the values of widget properties are correct.
7 |
8 | import 'package:flutter/material.dart';
9 | import 'package:flutter_test/flutter_test.dart';
10 |
11 | import 'package:video_conferening_mobile/main.dart';
12 |
13 | void main() {
14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async {
15 | // Build our app and trigger a frame.
16 | await tester.pumpWidget(MyApp());
17 |
18 | // Verify that our counter starts at 0.
19 | expect(find.text('0'), findsOneWidget);
20 | expect(find.text('1'), findsNothing);
21 |
22 | // Tap the '+' icon and trigger a frame.
23 | await tester.tap(find.byIcon(Icons.add));
24 | await tester.pump();
25 |
26 | // Verify that our counter has incremented.
27 | expect(find.text('0'), findsNothing);
28 | expect(find.text('1'), findsOneWidget);
29 | });
30 | }
31 |
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | video_conferening_mobile
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/lib/screen/join_screen.dart:
--------------------------------------------------------------------------------
1 |
2 | import 'package:flutter/material.dart';
3 | import 'package:video_conferening_mobile/pojo/meeting_detail.dart';
4 | import 'package:video_conferening_mobile/screen/meeting_screen.dart';
5 | import 'package:video_conferening_mobile/widget/button.dart';
6 |
7 | class JoinScreen extends StatefulWidget {
8 | final String meetingId;
9 | MeetingDetail meetingDetail;
10 |
11 | JoinScreen({Key key, this.meetingId, @required this.meetingDetail})
12 | : super(key: key);
13 |
14 | @override
15 | _JoinScreenState createState() => _JoinScreenState();
16 | }
17 |
18 | class _JoinScreenState extends State {
19 | final TextEditingController textEditingController =
20 | new TextEditingController();
21 |
22 | @override
23 | void initState() {
24 | super.initState();
25 | }
26 |
27 | void join() {
28 | var name = textEditingController.text;
29 | Navigator.pushReplacement(context,
30 | MaterialPageRoute(builder: (BuildContext context) {
31 | return MeetingScreen(
32 | meetingId: widget.meetingId,
33 | name: name,
34 | meetingDetail: widget.meetingDetail,
35 | );
36 | }));
37 | }
38 |
39 | @override
40 | Widget build(BuildContext context) {
41 | return Scaffold(
42 | appBar: AppBar(
43 | title: Text('Join Meeting'),
44 | ),
45 | body: Center(
46 | child: Column(
47 | children: [
48 | Container(
49 | padding: EdgeInsets.all(20.0),
50 | child: TextFormField(
51 | controller: textEditingController,
52 | decoration: InputDecoration(
53 | hintText: 'Enter your name',
54 | ),
55 | ),
56 | ),
57 | Button(
58 | text: "Join",
59 | onPressed: join,
60 | ),
61 | ],
62 | ),
63 | ),
64 | );
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/lib/widget/remote_video_page_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_webrtc/rtc_video_view.dart';
3 | import 'package:video_conferening_mobile/sdk/connection.dart';
4 | import 'package:video_conferening_mobile/widget/remote_connection.dart';
5 |
6 | class RemoteVideoPageView extends StatefulWidget {
7 | final List connections;
8 |
9 | RemoteVideoPageView({@required this.connections});
10 |
11 | @override
12 | State createState() => _RemoteVideoPageViewState();
13 | }
14 |
15 | class _RemoteVideoPageViewState extends State {
16 | Widget _buildRemoteViewPage(int start) {
17 | var widgets = [];
18 | var end = start + 2;
19 | var length = widget.connections.length;
20 | widget.connections
21 | .sublist(start, end <= length ? end : length)
22 | .forEach((connection) {
23 | widgets.add(RemoteConnection(
24 | renderer: connection.renderer,
25 | connection: connection,
26 | ));
27 | });
28 |
29 | return Container(
30 | child: Center(
31 | child: OrientationBuilder(builder: (context, orientation) {
32 | return orientation == Orientation.portrait
33 | ? Column(
34 | mainAxisAlignment: MainAxisAlignment.spaceEvenly,
35 | children: widgets,
36 | )
37 | : Row(
38 | mainAxisAlignment: MainAxisAlignment.spaceEvenly,
39 | children: widgets,
40 | );
41 | }),
42 | ),
43 | );
44 | }
45 |
46 | List _buildRemoteViewPages() {
47 | var widgets = [];
48 | for (int start = 0; start < widget.connections.length; start = start + 2) {
49 | widgets.add(_buildRemoteViewPage(start));
50 | }
51 | return widgets;
52 | }
53 |
54 | @override
55 | Widget build(BuildContext context) {
56 | return PageView(
57 | children: _buildRemoteViewPages(),
58 | );
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/lib/widget/control_panel.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:video_conferening_mobile/widget/actions_button.dart';
3 | import 'package:video_conferening_mobile/widget/button.dart';
4 |
5 | class ControlPanel extends StatelessWidget {
6 | final bool videoEnabled;
7 | final bool audioEnabled;
8 | final bool isConnectionFailed;
9 | final bool isChatOpen;
10 | final VoidCallback onVideoToggle;
11 | final VoidCallback onAudioToggle;
12 | final VoidCallback onReconnect;
13 | final VoidCallback onChatToggle;
14 |
15 | ControlPanel({
16 | this.onAudioToggle,
17 | this.onVideoToggle,
18 | this.videoEnabled,
19 | this.audioEnabled,
20 | this.onReconnect,
21 | this.isConnectionFailed,
22 | this.onChatToggle,
23 | this.isChatOpen,
24 | });
25 |
26 | List buildControls() {
27 | if (!isConnectionFailed) {
28 | return [
29 | IconButton(
30 | onPressed: onVideoToggle,
31 | icon: Icon(videoEnabled ? Icons.videocam : Icons.videocam_off),
32 | color: Colors.white,
33 | iconSize: 32.0,
34 | ),
35 | IconButton(
36 | onPressed: onAudioToggle,
37 | icon: Icon(audioEnabled ? Icons.mic : Icons.mic_off),
38 | color: Colors.white,
39 | iconSize: 32.0,
40 | ),
41 | IconButton(
42 | onPressed: onChatToggle,
43 | icon:
44 | Icon(isChatOpen ? Icons.speaker_notes_off : Icons.speaker_notes),
45 | color: Colors.white,
46 | iconSize: 32.0,
47 | ),
48 | ];
49 | } else {
50 | return [
51 | ActionButton(
52 | text: 'Reconnect',
53 | onPressed: onReconnect,
54 | color: Colors.red,
55 | ),
56 | ];
57 | }
58 | }
59 |
60 | @override
61 | Widget build(BuildContext context) {
62 | var widgets = buildControls();
63 | return Container(
64 | child: Row(
65 | mainAxisAlignment: MainAxisAlignment.spaceEvenly,
66 | children: widgets,
67 | ),
68 | color: Colors.blueGrey[700],
69 | height: 60.0,
70 | );
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion 28
30 | compileOptions {
31 | sourceCompatibility JavaVersion.VERSION_1_8
32 | targetCompatibility JavaVersion.VERSION_1_8
33 | }
34 | sourceSets {
35 | main.java.srcDirs += 'src/main/kotlin'
36 | }
37 |
38 | lintOptions {
39 | disable 'InvalidPackage'
40 | }
41 |
42 | defaultConfig {
43 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
44 | applicationId "com.madankumar.video_conferening_mobile"
45 | minSdkVersion 18
46 | targetSdkVersion 28
47 | versionCode flutterVersionCode.toInteger()
48 | versionName flutterVersionName
49 | }
50 |
51 | buildTypes {
52 | release {
53 | // TODO: Add your own signing config for the release build.
54 | // Signing with the debug keys for now, so `flutter run --release` works.
55 | signingConfig signingConfigs.debug
56 | useProguard true
57 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
58 | }
59 | }
60 | packagingOptions {
61 | exclude 'META-INF/proguard/androidx-annotations.pro'
62 | }
63 | }
64 |
65 | flutter {
66 | source '../..'
67 | }
68 |
69 | dependencies {
70 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
71 | }
72 |
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/lib/sdk/transport.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 | import 'dart:convert';
3 | import 'dart:io';
4 |
5 | import 'package:eventify/eventify.dart';
6 | import 'package:web_socket_channel/io.dart';
7 |
8 | class Transport extends EventEmitter {
9 | IOWebSocketChannel channel;
10 | String url;
11 | bool canReconnect = false;
12 | int retryCount = 0;
13 | int maxRetryCount = 1;
14 | Timer timer;
15 | bool closed = false;
16 |
17 | Transport({this.url, this.canReconnect, this.maxRetryCount});
18 |
19 | void connect() async {
20 | try {
21 | if (retryCount <= maxRetryCount) {
22 | retryCount++;
23 | //https://github.com/dart-lang/web_socket_channel/issues/61#issuecomment-585564273
24 | var ws = await WebSocket.connect(url).timeout(Duration(seconds: 5));
25 | channel = IOWebSocketChannel(ws);
26 | listenEvents();
27 | } else {
28 | this.emit('failed');
29 | }
30 | } catch (error) {
31 | print(error);
32 | connect();
33 | }
34 | }
35 |
36 | void listenEvents() {
37 | if (channel != null) {
38 | channel.stream.listen(handleMessage,
39 | onDone: handleClose, onError: handleError, cancelOnError: true);
40 | handleOpen();
41 | }
42 | }
43 |
44 | void remoteEvents() {}
45 |
46 | void handleOpen() {
47 | sendHeartbeat();
48 | this.emit('open');
49 | }
50 |
51 | void handleMessage(dynamic message) {
52 | this.emit('message', null, message);
53 | }
54 |
55 | void handleClose() {
56 | reset();
57 | if (!closed) {
58 | connect();
59 | }
60 | }
61 |
62 | void handleError(Object error) {
63 | print(error);
64 | reset();
65 | if (!closed) {
66 | connect();
67 | }
68 | }
69 |
70 | void send(String message) {
71 | if (channel != null) {
72 | channel.sink.add(message);
73 | }
74 | }
75 |
76 | void sendHeartbeat() {
77 | timer = Timer.periodic(Duration(seconds: 10), (timer) {
78 | send(json.encode({'type': 'heartbeat'}));
79 | });
80 | }
81 |
82 | void reset() {
83 | if (timer != null) {
84 | timer.cancel();
85 | timer = null;
86 | }
87 | if (channel != null) {
88 | channel.sink.close();
89 | channel = null;
90 | }
91 | }
92 |
93 | void close() {
94 | closed = true;
95 | destroy();
96 | }
97 |
98 | void destroy() {
99 | reset();
100 | url = '';
101 | }
102 |
103 | void reconnect() {
104 | retryCount = 0;
105 | connect();
106 | }
107 | }
108 |
--------------------------------------------------------------------------------
/lib/widget/remote_connection.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_webrtc/enums.dart';
3 | import 'package:flutter_webrtc/media_stream.dart';
4 | import 'package:flutter_webrtc/rtc_video_view.dart';
5 | import 'package:video_conferening_mobile/sdk/connection.dart';
6 |
7 | class RemoteConnection extends StatefulWidget {
8 | // final RTCVideoRenderer renderer = new RTCVideoRenderer();
9 | final RTCVideoRenderer renderer;
10 | final Connection connection;
11 |
12 | // final MediaStream stream;
13 |
14 | // RemoteConnection({@required this.stream});
15 | RemoteConnection({@required this.renderer, @required this.connection});
16 |
17 | @override
18 | _RemoteConnectionState createState() => _RemoteConnectionState();
19 | }
20 |
21 | class _RemoteConnectionState extends State {
22 | @override
23 | void initState() {
24 | super.initState();
25 | }
26 |
27 | @override
28 | void dispose() {
29 | super.dispose();
30 | }
31 |
32 | @override
33 | Widget build(BuildContext context) {
34 | return Expanded(
35 | child: Stack(
36 | children: [
37 | RTCVideoView(widget.renderer),
38 | Positioned(
39 | child: Container(
40 | padding: EdgeInsets.all(5),
41 | color: Color.fromRGBO(0, 0, 0, 0.7),
42 | child: Text(
43 | widget.connection.name,
44 | style: TextStyle(
45 | fontSize: 20.0,
46 | color: Colors.white,
47 | ),
48 | ),
49 | ),
50 | bottom: 10.0,
51 | left: 10.0,
52 | ),
53 | Container(
54 | color: widget.connection.videoEnabled
55 | ? Colors.transparent
56 | : Colors.black,
57 | child: Center(
58 | child: Text(
59 | widget.connection.videoEnabled ? '' : widget.connection.name,
60 | style: TextStyle(
61 | color: Colors.white,
62 | fontSize: 30.0,
63 | ),
64 | )),
65 | ),
66 | Positioned(
67 | child: Container(
68 | padding: EdgeInsets.all(5),
69 | color: Color.fromRGBO(0, 0, 0, 0.7),
70 | child: Row(
71 | children: [
72 | Icon(
73 | widget.connection.videoEnabled
74 | ? Icons.videocam
75 | : Icons.videocam_off,
76 | color: Colors.white,
77 | ),
78 | SizedBox(
79 | width: 10,
80 | height: 10,
81 | ),
82 | Icon(
83 | widget.connection.audioEnabled ? Icons.mic : Icons.mic_off,
84 | color: Colors.white,
85 | ),
86 | ],
87 | ),
88 | ),
89 | bottom: 10.0,
90 | right: 10.0,
91 | )
92 | ],
93 | ),
94 | );
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
8 |
12 |
19 |
23 |
26 |
31 |
34 |
35 |
36 |
37 |
38 |
39 |
41 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: video_conferening_mobile
2 | description: A video conferencing mobile app using flutter, webrtc and websocket
3 |
4 | # The following line prevents the package from being accidentally published to
5 | # pub.dev using `pub publish`. This is preferred for private packages.
6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev
7 |
8 | # The following defines the version and build number for your application.
9 | # A version number is three numbers separated by dots, like 1.2.43
10 | # followed by an optional build number separated by a +.
11 | # Both the version and the builder number may be overridden in flutter
12 | # build by specifying --build-name and --build-number, respectively.
13 | # In Android, build-name is used as versionName while build-number used as versionCode.
14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning
15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
16 | # Read more about iOS versioning at
17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
18 | version: 1.0.0+1
19 |
20 | environment:
21 | sdk: ">=2.7.0 <3.0.0"
22 |
23 | dependencies:
24 | flutter:
25 | sdk: flutter
26 | http: ^0.12.2
27 | uuid: 2.2.0
28 | shared_preferences: 0.5.8
29 | web_socket_channel: ^1.1.0
30 | eventify: ^0.1.4
31 | flutter_webrtc: ^0.2.8
32 |
33 |
34 | # The following adds the Cupertino Icons font to your application.
35 | # Use with the CupertinoIcons class for iOS style icons.
36 | cupertino_icons: ^0.1.3
37 |
38 | dev_dependencies:
39 | flutter_test:
40 | sdk: flutter
41 |
42 | # For information on the generic Dart part of this file, see the
43 | # following page: https://dart.dev/tools/pub/pubspec
44 |
45 | # The following section is specific to Flutter.
46 | flutter:
47 |
48 | # The following line ensures that the Material Icons font is
49 | # included with your application, so that you can use the icons in
50 | # the material Icons class.
51 | uses-material-design: true
52 |
53 | # To add assets to your application, add an assets section, like this:
54 | # assets:
55 | # - images/a_dot_burr.jpeg
56 | # - images/a_dot_ham.jpeg
57 |
58 | # An image asset can refer to one or more resolution-specific "variants", see
59 | # https://flutter.dev/assets-and-images/#resolution-aware.
60 |
61 | # For details regarding adding assets from package dependencies, see
62 | # https://flutter.dev/assets-and-images/#from-packages
63 |
64 | # To add custom fonts to your application, add a fonts section here,
65 | # in this "flutter" section. Each entry in this list should have a
66 | # "family" key with the font family name, and a "fonts" key with a
67 | # list giving the asset and other descriptors for the font. For
68 | # example:
69 | # fonts:
70 | # - family: Schyler
71 | # fonts:
72 | # - asset: fonts/Schyler-Regular.ttf
73 | # - asset: fonts/Schyler-Italic.ttf
74 | # style: italic
75 | # - family: Trajan Pro
76 | # fonts:
77 | # - asset: fonts/TrajanPro.ttf
78 | # - asset: fonts/TrajanPro_Bold.ttf
79 | # weight: 700
80 | #
81 | # For details regarding fonts from package dependencies,
82 | # see https://flutter.dev/custom-fonts/#from-packages
83 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/lib/screen/chat_screen.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:video_conferening_mobile/sdk/connection.dart';
5 | import 'package:video_conferening_mobile/sdk/message_format.dart';
6 | import 'package:video_conferening_mobile/widget/actions_button.dart';
7 |
8 | typedef SendMessageCallback = void Function(String text);
9 |
10 | class ChatScreen extends StatelessWidget {
11 | final List messages;
12 | final SendMessageCallback onSendMessage;
13 | final TextEditingController textEditingController =
14 | new TextEditingController();
15 | final List connections;
16 | final String userId;
17 | final String userName;
18 | final _scrollcontroller = ScrollController();
19 |
20 | ChatScreen({
21 | this.messages,
22 | this.onSendMessage,
23 | this.connections,
24 | this.userId,
25 | this.userName,
26 | });
27 |
28 | List _buildMessages() {
29 | final nameMap = new Map();
30 | this.connections.forEach((connection) {
31 | nameMap[connection.userId] = connection.name;
32 | });
33 | return messages
34 | .map((message) => ListTile(
35 | title: Text(
36 | nameMap.containsKey(message.userId)
37 | ? nameMap[message.userId]
38 | : (message.userId == userId ? userName : ''),
39 | style: TextStyle(fontWeight: FontWeight.bold),
40 | ),
41 | subtitle: Text(
42 | message.text,
43 | style: TextStyle(fontSize: 24),
44 | ),
45 | isThreeLine: true,
46 | ))
47 | .toList();
48 | }
49 |
50 | void onSendClick() {
51 | var text = textEditingController.text;
52 | onSendMessage(text);
53 | }
54 |
55 | @override
56 | Widget build(BuildContext context) {
57 | Timer(
58 | Duration(seconds: 1),
59 | () =>
60 | _scrollcontroller.jumpTo(_scrollcontroller.position.maxScrollExtent),
61 | );
62 | return Container(
63 | width: 100.0,
64 | child: Column(
65 | children: [
66 | Center(
67 | child: Text(
68 | 'Chat',
69 | style: TextStyle(
70 | color: Colors.green,
71 | fontSize: 32.0,
72 | fontWeight: FontWeight.bold,
73 | ),
74 | ),
75 | ),
76 | Expanded(
77 | child: ListView(
78 | controller: _scrollcontroller,
79 | children: ListTile.divideTiles(
80 | context: context,
81 | tiles: _buildMessages(),
82 | ).toList(),
83 | ),
84 | ),
85 | Container(
86 | color: Colors.white,
87 | padding: EdgeInsets.all(10.0),
88 | child: Row(
89 | children: [
90 | Expanded(
91 | child: TextFormField(
92 | controller: textEditingController,
93 | style: TextStyle(
94 | fontSize: 20,
95 | ),
96 | decoration: InputDecoration(
97 | hintStyle: TextStyle(
98 | fontSize: 20,
99 | ),
100 | ),
101 | ),
102 | ),
103 | ActionButton(
104 | text: 'Send',
105 | color: Colors.green,
106 | onPressed: onSendClick,
107 | ),
108 | ],
109 | ),
110 | ),
111 | ],
112 | ),
113 | );
114 | }
115 | }
116 |
--------------------------------------------------------------------------------
/lib/screen/home_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:http/http.dart';
3 | import 'package:video_conferening_mobile/pojo/meeting_detail.dart';
4 | import 'package:video_conferening_mobile/screen/join_screen.dart';
5 | import 'package:video_conferening_mobile/service/meeting_api.dart';
6 | import '../widget/button.dart';
7 | import 'dart:convert';
8 |
9 | class HomeScreen extends StatefulWidget {
10 | HomeScreen({Key key, this.title}) : super(key: key);
11 |
12 | final String title;
13 |
14 | @override
15 | _HomeScreenState createState() => _HomeScreenState();
16 | }
17 |
18 | class _HomeScreenState extends State {
19 | final TextEditingController controller = new TextEditingController();
20 | final scaffoldKey = GlobalKey();
21 |
22 | void goToJoinScreen(MeetingDetail meetingDetail) {
23 | Navigator.pushReplacement(
24 | context,
25 | MaterialPageRoute(
26 | builder: (context) => JoinScreen(
27 | meetingId: meetingDetail.id,
28 | meetingDetail: meetingDetail,
29 | ),
30 | ),
31 | );
32 | }
33 |
34 | void validateMeeting(String meetingId) async {
35 | try {
36 | Response response = await joinMeeting(meetingId);
37 | var data = json.decode(response.body);
38 | final meetingDetail = MeetingDetail.fromJson(data);
39 | print('meetingDetail $meetingDetail');
40 | goToJoinScreen(meetingDetail);
41 | } catch (err) {
42 | final snackbar = SnackBar(content: Text('Invalid MeetingId'));
43 | scaffoldKey.currentState.showSnackBar(snackbar);
44 | print(err);
45 | }
46 | }
47 |
48 | void joinMeetingClick() async {
49 | final meetingId = controller.text;
50 | print('Joined meeting $meetingId');
51 | validateMeeting(meetingId);
52 | }
53 |
54 | void startMeetingClick() async {
55 | var response = await startMeeting();
56 | final body = json.decode(response.body);
57 | final meetingId = body['meetingId'];
58 | print('Started meeting $meetingId');
59 | validateMeeting(meetingId);
60 | }
61 |
62 | @override
63 | void initState() {
64 | super.initState();
65 | }
66 |
67 | @override
68 | Widget build(BuildContext context) {
69 | return Scaffold(
70 | key: scaffoldKey,
71 | appBar: AppBar(
72 | title: Text(widget.title),
73 | ),
74 | body: Center(
75 | child: Padding(
76 | padding: EdgeInsets.all(20.0),
77 | child: Column(
78 | mainAxisAlignment: MainAxisAlignment.center,
79 | children: [
80 | Container(
81 | margin: EdgeInsets.only(bottom: 40.0),
82 | child: Text(
83 | "Welcome to Meet X",
84 | style: TextStyle(
85 | color: Colors.green,
86 | fontSize: 32.0,
87 | ),
88 | ),
89 | ),
90 | Container(
91 | margin: EdgeInsets.only(bottom: 20.0),
92 | child: TextFormField(
93 | controller: controller,
94 | style: TextStyle(
95 | fontSize: 20,
96 | ),
97 | decoration: InputDecoration(
98 | hintText: 'Enter the Meeting Id',
99 | hintStyle: TextStyle(
100 | fontSize: 20,
101 | ),
102 | ),
103 | ),
104 | ),
105 | Button(
106 | text: "Join Meeting",
107 | onPressed: joinMeetingClick,
108 | ),
109 | Button(
110 | text: "Start Meeting",
111 | onPressed: startMeetingClick,
112 | ),
113 | ],
114 | ),
115 | ),
116 | ),
117 | );
118 | }
119 | }
120 |
--------------------------------------------------------------------------------
/lib/sdk/peer_connection.dart:
--------------------------------------------------------------------------------
1 | import 'package:eventify/eventify.dart';
2 | import 'package:flutter_webrtc/rtc_peerconnection.dart';
3 | import 'package:flutter_webrtc/rtc_peerconnection_factory.dart';
4 | import 'package:flutter_webrtc/webrtc.dart';
5 |
6 | class PeerConnection extends EventEmitter {
7 | MediaStream localStream;
8 | MediaStream remoteStream;
9 | RTCVideoRenderer renderer = new RTCVideoRenderer();
10 |
11 | RTCPeerConnection rtcPeerConnection;
12 |
13 | PeerConnection({this.localStream});
14 |
15 | final Map configuration = {
16 | 'iceServers': [
17 | {
18 | "urls": [
19 | 'stun:stun.l.google.com:19302',
20 | 'stun:stun1.l.google.com:19302'
21 | ],
22 | }
23 | ]
24 | };
25 | final Map loopbackConstraints = {
26 | "mandatory": {},
27 | "optional": [
28 | {"DtlsSrtpKeyAgreement": true},
29 | ],
30 | };
31 |
32 | final Map offerSdpConstraints = {
33 | "mandatory": {
34 | "OfferToReceiveAudio": true,
35 | "OfferToReceiveVideo": true,
36 | },
37 | "optional": [],
38 | };
39 |
40 | Future start() async {
41 | rtcPeerConnection =
42 | await createPeerConnection(configuration, loopbackConstraints);
43 | rtcPeerConnection.addStream(localStream);
44 | rtcPeerConnection.onAddStream = _onAddStream;
45 | rtcPeerConnection.onRemoveStream = _onRemoveStream;
46 | rtcPeerConnection.onRenegotiationNeeded = _onRenegotiationNeeded;
47 | rtcPeerConnection.onIceCandidate = _onIceCandidate;
48 | await renderer.initialize();
49 | this.emit('connected');
50 | }
51 |
52 | void _onAddStream(MediaStream stream) {
53 | remoteStream = stream;
54 | renderer.srcObject = stream;
55 | renderer.objectFit = RTCVideoViewObjectFit.RTCVideoViewObjectFitContain;
56 | this.emit('stream-changed');
57 | }
58 |
59 | void _onRemoveStream(MediaStream stream) {
60 | remoteStream = null;
61 | }
62 |
63 | void _onRenegotiationNeeded() {
64 | print('negotiationneeded');
65 | this.emit('negotiationneeded');
66 | }
67 |
68 | void _onIceCandidate(RTCIceCandidate candidate) {
69 | if (candidate != null) {
70 | this.emit('candidate', null, candidate);
71 | }
72 | }
73 |
74 | Future createOffer() async {
75 | if (rtcPeerConnection != null) {
76 | try {
77 | final RTCSessionDescription sdp =
78 | await rtcPeerConnection.createOffer(offerSdpConstraints);
79 | await rtcPeerConnection.setLocalDescription(sdp);
80 | return sdp;
81 | } catch (error) {
82 | print(error);
83 | }
84 | }
85 | return null;
86 | }
87 |
88 | Future setOfferSdp(RTCSessionDescription sdp) async {
89 | if (rtcPeerConnection != null) {
90 | await rtcPeerConnection.setRemoteDescription(sdp);
91 | }
92 | }
93 |
94 | Future createAnswer() async {
95 | if (rtcPeerConnection != null) {
96 | final RTCSessionDescription sdp =
97 | await rtcPeerConnection.createAnswer(offerSdpConstraints);
98 | await rtcPeerConnection.setLocalDescription(sdp);
99 | return sdp;
100 | }
101 | return null;
102 | }
103 |
104 | Future setAnswerSdp(RTCSessionDescription sdp) async {
105 | if (rtcPeerConnection != null) {
106 | await rtcPeerConnection.setRemoteDescription(sdp);
107 | }
108 | }
109 |
110 | Future setCandidate(RTCIceCandidate candidate) async {
111 | if (rtcPeerConnection != null) {
112 | await rtcPeerConnection.addCandidate(candidate);
113 | }
114 | }
115 |
116 | void close() {
117 | if (rtcPeerConnection != null) {
118 | rtcPeerConnection.close();
119 | rtcPeerConnection = null;
120 | }
121 | renderer.dispose();
122 | localStream = null;
123 | remoteStream = null;
124 | }
125 | }
126 |
--------------------------------------------------------------------------------
/lib/sdk/payload_data.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_webrtc/rtc_ice_candidate.dart';
2 | import 'package:flutter_webrtc/rtc_session_description.dart';
3 | import 'package:video_conferening_mobile/sdk/message_format.dart';
4 |
5 | class JoinedMeetingData {
6 | String userId;
7 | String name;
8 |
9 | JoinedMeetingData({this.userId, this.name});
10 |
11 | factory JoinedMeetingData.fromJson(dynamic json) {
12 | return JoinedMeetingData(
13 | userId: json['userId'],
14 | name: json['name'],
15 | );
16 | }
17 | }
18 |
19 | class Config {
20 | bool videoEnabled;
21 | bool audioEnabled;
22 |
23 | Config({this.videoEnabled, this.audioEnabled});
24 | }
25 |
26 | class UserJoinedData {
27 | String userId;
28 | String name;
29 | Config config;
30 |
31 | UserJoinedData({this.userId, this.name, this.config});
32 |
33 | factory UserJoinedData.fromJson(dynamic json) {
34 | return UserJoinedData(
35 | userId: json['userId'],
36 | name: json['name'],
37 | config: Config(
38 | audioEnabled: json['config']['audioEnabled'],
39 | videoEnabled: json['config']['videoEnabled'],
40 | ),
41 | );
42 | }
43 | }
44 |
45 | class IncomingConnectionRequestData {
46 | String userId;
47 | String name;
48 | Config config;
49 |
50 | IncomingConnectionRequestData({this.userId, this.name, this.config});
51 |
52 | factory IncomingConnectionRequestData.fromJson(dynamic json) {
53 | return IncomingConnectionRequestData(
54 | userId: json['userId'],
55 | name: json['name'],
56 | config: Config(
57 | audioEnabled: json['config']['audioEnabled'],
58 | videoEnabled: json['config']['videoEnabled'],
59 | ),
60 | );
61 | }
62 | }
63 |
64 | class OfferSdpData {
65 | String userId;
66 | String name;
67 | RTCSessionDescription sdp;
68 |
69 | OfferSdpData({this.userId, this.name, this.sdp});
70 |
71 | factory OfferSdpData.fromJson(dynamic json) {
72 | return OfferSdpData(
73 | userId: json['userId'],
74 | name: json['name'],
75 | sdp: RTCSessionDescription(json['sdp']['sdp'], json['sdp']['type']),
76 | );
77 | }
78 | }
79 |
80 | class AnswerSdpData {
81 | String userId;
82 | String name;
83 | RTCSessionDescription sdp;
84 |
85 | AnswerSdpData({this.userId, this.name, this.sdp});
86 |
87 | factory AnswerSdpData.fromJson(dynamic json) {
88 | return AnswerSdpData(
89 | userId: json['userId'],
90 | name: json['name'],
91 | sdp: RTCSessionDescription(json['sdp']['sdp'], json['sdp']['type']),
92 | );
93 | }
94 | }
95 |
96 | class MeetingEndedData {
97 | String userId;
98 | String name;
99 |
100 | MeetingEndedData({this.userId, this.name});
101 |
102 | factory MeetingEndedData.fromJson(dynamic json) {
103 | return MeetingEndedData(
104 | userId: json['userId'],
105 | name: json['name'],
106 | );
107 | }
108 | }
109 |
110 | class UserLeftData {
111 | String userId;
112 | String name;
113 |
114 | UserLeftData({this.userId, this.name});
115 |
116 | factory UserLeftData.fromJson(dynamic json) {
117 | return UserLeftData(
118 | userId: json['userId'],
119 | name: json['name'],
120 | );
121 | }
122 | }
123 |
124 | class IceCandidateData {
125 | String userId;
126 | String name;
127 | RTCIceCandidate candidate;
128 |
129 | IceCandidateData({this.userId, this.name, this.candidate});
130 |
131 | factory IceCandidateData.fromJson(dynamic json) {
132 | return IceCandidateData(
133 | userId: json['userId'],
134 | name: json['name'],
135 | candidate: RTCIceCandidate(
136 | json['candidate']['candidate'],
137 | json['candidate']['sdpMid'],
138 | json['candidate']['sdpMLineIndex'],
139 | ),
140 | );
141 | }
142 | }
143 |
144 | class VideoToggleData {
145 | String userId;
146 | bool videoEnabled;
147 |
148 | VideoToggleData({this.userId, this.videoEnabled});
149 |
150 | factory VideoToggleData.fromJson(dynamic json) {
151 | return VideoToggleData(
152 | userId: json['userId'],
153 | videoEnabled: json['videoEnabled'],
154 | );
155 | }
156 | }
157 |
158 | class AudioToggleData {
159 | String userId;
160 | bool audioEnabled;
161 |
162 | AudioToggleData({this.userId, this.audioEnabled});
163 |
164 | factory AudioToggleData.fromJson(dynamic json) {
165 | return AudioToggleData(
166 | userId: json['userId'],
167 | audioEnabled: json['audioEnabled'],
168 | );
169 | }
170 | }
171 |
172 | class MessageData {
173 | String userId;
174 | MessageFormat message;
175 |
176 | MessageData({this.userId, this.message});
177 |
178 | factory MessageData.fromJson(dynamic json) {
179 | return MessageData(
180 | userId: json['userId'],
181 | message: MessageFormat(
182 | userId: json['message']['userId'],
183 | text: json['message']['text'],
184 | ),
185 | );
186 | }
187 | }
188 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
10 |
12 |
14 |
16 |
18 |
20 |
22 |
24 |
26 |
28 |
30 |
32 |
34 |
36 |
38 |
40 |
42 |
44 |
46 |
48 |
50 |
52 |
54 |
56 |
58 |
60 |
62 |
64 |
66 |
68 |
70 |
72 |
74 |
75 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | archive:
5 | dependency: transitive
6 | description:
7 | name: archive
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "2.0.13"
11 | args:
12 | dependency: transitive
13 | description:
14 | name: args
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "1.6.0"
18 | async:
19 | dependency: transitive
20 | description:
21 | name: async
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "2.4.1"
25 | boolean_selector:
26 | dependency: transitive
27 | description:
28 | name: boolean_selector
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "2.0.0"
32 | charcode:
33 | dependency: transitive
34 | description:
35 | name: charcode
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "1.1.3"
39 | collection:
40 | dependency: transitive
41 | description:
42 | name: collection
43 | url: "https://pub.dartlang.org"
44 | source: hosted
45 | version: "1.14.12"
46 | convert:
47 | dependency: transitive
48 | description:
49 | name: convert
50 | url: "https://pub.dartlang.org"
51 | source: hosted
52 | version: "2.1.1"
53 | crypto:
54 | dependency: transitive
55 | description:
56 | name: crypto
57 | url: "https://pub.dartlang.org"
58 | source: hosted
59 | version: "2.1.4"
60 | cupertino_icons:
61 | dependency: "direct main"
62 | description:
63 | name: cupertino_icons
64 | url: "https://pub.dartlang.org"
65 | source: hosted
66 | version: "0.1.3"
67 | eventify:
68 | dependency: "direct main"
69 | description:
70 | name: eventify
71 | url: "https://pub.dartlang.org"
72 | source: hosted
73 | version: "0.1.4"
74 | file:
75 | dependency: transitive
76 | description:
77 | name: file
78 | url: "https://pub.dartlang.org"
79 | source: hosted
80 | version: "5.2.1"
81 | flutter:
82 | dependency: "direct main"
83 | description: flutter
84 | source: sdk
85 | version: "0.0.0"
86 | flutter_test:
87 | dependency: "direct dev"
88 | description: flutter
89 | source: sdk
90 | version: "0.0.0"
91 | flutter_web_plugins:
92 | dependency: transitive
93 | description: flutter
94 | source: sdk
95 | version: "0.0.0"
96 | flutter_webrtc:
97 | dependency: "direct main"
98 | description:
99 | name: flutter_webrtc
100 | url: "https://pub.dartlang.org"
101 | source: hosted
102 | version: "0.2.8"
103 | http:
104 | dependency: "direct main"
105 | description:
106 | name: http
107 | url: "https://pub.dartlang.org"
108 | source: hosted
109 | version: "0.12.2"
110 | http_parser:
111 | dependency: transitive
112 | description:
113 | name: http_parser
114 | url: "https://pub.dartlang.org"
115 | source: hosted
116 | version: "3.1.4"
117 | image:
118 | dependency: transitive
119 | description:
120 | name: image
121 | url: "https://pub.dartlang.org"
122 | source: hosted
123 | version: "2.1.12"
124 | intl:
125 | dependency: transitive
126 | description:
127 | name: intl
128 | url: "https://pub.dartlang.org"
129 | source: hosted
130 | version: "0.16.1"
131 | matcher:
132 | dependency: transitive
133 | description:
134 | name: matcher
135 | url: "https://pub.dartlang.org"
136 | source: hosted
137 | version: "0.12.6"
138 | meta:
139 | dependency: transitive
140 | description:
141 | name: meta
142 | url: "https://pub.dartlang.org"
143 | source: hosted
144 | version: "1.1.8"
145 | path:
146 | dependency: transitive
147 | description:
148 | name: path
149 | url: "https://pub.dartlang.org"
150 | source: hosted
151 | version: "1.6.4"
152 | path_provider_linux:
153 | dependency: transitive
154 | description:
155 | name: path_provider_linux
156 | url: "https://pub.dartlang.org"
157 | source: hosted
158 | version: "0.0.1+2"
159 | path_provider_platform_interface:
160 | dependency: transitive
161 | description:
162 | name: path_provider_platform_interface
163 | url: "https://pub.dartlang.org"
164 | source: hosted
165 | version: "1.0.3"
166 | pedantic:
167 | dependency: transitive
168 | description:
169 | name: pedantic
170 | url: "https://pub.dartlang.org"
171 | source: hosted
172 | version: "1.9.0"
173 | petitparser:
174 | dependency: transitive
175 | description:
176 | name: petitparser
177 | url: "https://pub.dartlang.org"
178 | source: hosted
179 | version: "2.4.0"
180 | platform:
181 | dependency: transitive
182 | description:
183 | name: platform
184 | url: "https://pub.dartlang.org"
185 | source: hosted
186 | version: "2.2.1"
187 | plugin_platform_interface:
188 | dependency: transitive
189 | description:
190 | name: plugin_platform_interface
191 | url: "https://pub.dartlang.org"
192 | source: hosted
193 | version: "1.0.2"
194 | process:
195 | dependency: transitive
196 | description:
197 | name: process
198 | url: "https://pub.dartlang.org"
199 | source: hosted
200 | version: "3.0.13"
201 | quiver:
202 | dependency: transitive
203 | description:
204 | name: quiver
205 | url: "https://pub.dartlang.org"
206 | source: hosted
207 | version: "2.1.3"
208 | shared_preferences:
209 | dependency: "direct main"
210 | description:
211 | name: shared_preferences
212 | url: "https://pub.dartlang.org"
213 | source: hosted
214 | version: "0.5.8"
215 | shared_preferences_linux:
216 | dependency: transitive
217 | description:
218 | name: shared_preferences_linux
219 | url: "https://pub.dartlang.org"
220 | source: hosted
221 | version: "0.0.2+1"
222 | shared_preferences_macos:
223 | dependency: transitive
224 | description:
225 | name: shared_preferences_macos
226 | url: "https://pub.dartlang.org"
227 | source: hosted
228 | version: "0.0.1+10"
229 | shared_preferences_platform_interface:
230 | dependency: transitive
231 | description:
232 | name: shared_preferences_platform_interface
233 | url: "https://pub.dartlang.org"
234 | source: hosted
235 | version: "1.0.4"
236 | shared_preferences_web:
237 | dependency: transitive
238 | description:
239 | name: shared_preferences_web
240 | url: "https://pub.dartlang.org"
241 | source: hosted
242 | version: "0.1.2+7"
243 | sky_engine:
244 | dependency: transitive
245 | description: flutter
246 | source: sdk
247 | version: "0.0.99"
248 | source_span:
249 | dependency: transitive
250 | description:
251 | name: source_span
252 | url: "https://pub.dartlang.org"
253 | source: hosted
254 | version: "1.7.0"
255 | stack_trace:
256 | dependency: transitive
257 | description:
258 | name: stack_trace
259 | url: "https://pub.dartlang.org"
260 | source: hosted
261 | version: "1.9.3"
262 | stream_channel:
263 | dependency: transitive
264 | description:
265 | name: stream_channel
266 | url: "https://pub.dartlang.org"
267 | source: hosted
268 | version: "2.0.0"
269 | string_scanner:
270 | dependency: transitive
271 | description:
272 | name: string_scanner
273 | url: "https://pub.dartlang.org"
274 | source: hosted
275 | version: "1.0.5"
276 | term_glyph:
277 | dependency: transitive
278 | description:
279 | name: term_glyph
280 | url: "https://pub.dartlang.org"
281 | source: hosted
282 | version: "1.1.0"
283 | test_api:
284 | dependency: transitive
285 | description:
286 | name: test_api
287 | url: "https://pub.dartlang.org"
288 | source: hosted
289 | version: "0.2.15"
290 | typed_data:
291 | dependency: transitive
292 | description:
293 | name: typed_data
294 | url: "https://pub.dartlang.org"
295 | source: hosted
296 | version: "1.1.6"
297 | uuid:
298 | dependency: "direct main"
299 | description:
300 | name: uuid
301 | url: "https://pub.dartlang.org"
302 | source: hosted
303 | version: "2.2.0"
304 | vector_math:
305 | dependency: transitive
306 | description:
307 | name: vector_math
308 | url: "https://pub.dartlang.org"
309 | source: hosted
310 | version: "2.0.8"
311 | web_socket_channel:
312 | dependency: "direct main"
313 | description:
314 | name: web_socket_channel
315 | url: "https://pub.dartlang.org"
316 | source: hosted
317 | version: "1.1.0"
318 | xdg_directories:
319 | dependency: transitive
320 | description:
321 | name: xdg_directories
322 | url: "https://pub.dartlang.org"
323 | source: hosted
324 | version: "0.1.0"
325 | xml:
326 | dependency: transitive
327 | description:
328 | name: xml
329 | url: "https://pub.dartlang.org"
330 | source: hosted
331 | version: "3.6.1"
332 | sdks:
333 | dart: ">=2.7.0 <3.0.0"
334 | flutter: ">=1.12.13+hotfix.5 <2.0.0"
335 |
--------------------------------------------------------------------------------
/lib/screen/meeting_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter/services.dart';
3 | import 'package:flutter_webrtc/get_user_media.dart';
4 | import 'package:flutter_webrtc/media_stream.dart';
5 | import 'package:flutter_webrtc/rtc_video_view.dart';
6 | import 'package:flutter_webrtc/webrtc.dart';
7 | import 'package:video_conferening_mobile/pojo/meeting_detail.dart';
8 | import 'package:video_conferening_mobile/screen/chat_screen.dart';
9 | import 'package:video_conferening_mobile/screen/home_screen.dart';
10 | import 'package:video_conferening_mobile/sdk/meeting.dart';
11 | import 'package:video_conferening_mobile/sdk/message_format.dart';
12 | import 'package:video_conferening_mobile/util/user.util.dart';
13 | import 'package:video_conferening_mobile/widget/actions_button.dart';
14 | import 'package:video_conferening_mobile/widget/control_panel.dart';
15 | import 'package:video_conferening_mobile/widget/remote_video_page_view.dart';
16 |
17 | enum PopUpChoiceEnum { CopyLink, CopyId }
18 |
19 | class PopUpChoice {
20 | PopUpChoiceEnum id;
21 | String title;
22 |
23 | PopUpChoice(this.id, this.title);
24 | }
25 |
26 | class MeetingScreen extends StatefulWidget {
27 | final String meetingId;
28 | final String name;
29 | final MeetingDetail meetingDetail;
30 |
31 | MeetingScreen(
32 | {Key key,
33 | @required this.meetingId,
34 | @required this.name,
35 | @required this.meetingDetail})
36 | : super(key: key);
37 |
38 | @override
39 | _MeetingScreenState createState() => _MeetingScreenState();
40 | }
41 |
42 | class _MeetingScreenState extends State {
43 | bool isValidMeeting = false;
44 | TextEditingController textEditingController = new TextEditingController();
45 | Meeting meeting;
46 | bool isConnectionFailed = false;
47 | final _localRenderer = new RTCVideoRenderer();
48 | final scaffoldKey = GlobalKey();
49 | final Map mediaConstraints = {
50 | "audio": true,
51 | "video": true,
52 | // {
53 | // "mandatory": {
54 | // "minWidth":
55 | // '1280', // Provide your own width, height and frame rate here
56 | // "minHeight": '720',
57 | // "minFrameRate": '30',
58 | // },
59 | // "facingMode": "user",
60 | // "optional": [],
61 | // }
62 | };
63 | final List choices = [
64 | PopUpChoice(PopUpChoiceEnum.CopyId, 'Copy Meeting ID'),
65 | PopUpChoice(PopUpChoiceEnum.CopyLink, 'Copy Meeting Link'),
66 | ];
67 | bool isChatOpen = false;
68 | List messages = new List();
69 | final PageController pageController = new PageController();
70 |
71 | @override
72 | void initState() {
73 | super.initState();
74 | initRenderers();
75 | start();
76 | }
77 |
78 | @override
79 | deactivate() {
80 | super.deactivate();
81 | _localRenderer.dispose();
82 | if (meeting != null) {
83 | meeting.destroy();
84 | meeting = null;
85 | }
86 | }
87 |
88 | initRenderers() async {
89 | await _localRenderer.initialize();
90 | }
91 |
92 | void goToHome() {
93 | Navigator.pushReplacement(
94 | context,
95 | MaterialPageRoute(
96 | builder: (context) => HomeScreen(
97 | title: 'Home',
98 | ),
99 | ),
100 | );
101 | }
102 |
103 | void start() async {
104 | final String userId = await loadUserId();
105 | MediaStream _localstream = await navigator.getUserMedia(mediaConstraints);
106 |
107 | _localRenderer.srcObject = _localstream;
108 | _localRenderer.objectFit =
109 | RTCVideoViewObjectFit.RTCVideoViewObjectFitContain;
110 | meeting = new Meeting(
111 | meetingId: widget.meetingDetail.id,
112 | stream: _localstream,
113 | userId: userId,
114 | name: widget.name,
115 | );
116 | meeting.on('open', null, (ev, context) {
117 | setState(() {
118 | isConnectionFailed = false;
119 | });
120 | });
121 | meeting.on('connection', null, (ev, context) {
122 | setState(() {
123 | isConnectionFailed = false;
124 | });
125 | });
126 | meeting.on('user-left', null, (ev, ctx) {
127 | setState(() {
128 | isConnectionFailed = false;
129 | });
130 | });
131 | meeting.on('ended', null, (ev, ctx) {
132 | meetingEndedEvent();
133 | });
134 | meeting.on('connection-setting-changed', null, (ev, ctx) {
135 | setState(() {
136 | isConnectionFailed = false;
137 | });
138 | });
139 | meeting.on('message', null, (ev, ctx) {
140 | setState(() {
141 | isConnectionFailed = false;
142 | messages.add(ev.eventData);
143 | });
144 | });
145 | meeting.on('stream-changed', null, (ev, ctx) {
146 | setState(() {
147 | isConnectionFailed = false;
148 | });
149 | });
150 | meeting.on('failed', null, (ev, ctx) {
151 | final snackBar = SnackBar(content: Text('Connection Failed'));
152 | scaffoldKey.currentState.showSnackBar(snackBar);
153 | setState(() {
154 | isConnectionFailed = true;
155 | });
156 | });
157 | meeting.on('not-found', null, (ev, ctx) {
158 | meetingEndedEvent();
159 | });
160 | setState(() {
161 | isValidMeeting = false;
162 | });
163 | }
164 |
165 | void meetingEndedEvent() {
166 | final snackBar = SnackBar(content: Text('Meeing Ended'));
167 | scaffoldKey.currentState.showSnackBar(snackBar);
168 | goToHome();
169 | }
170 |
171 | void exitClick() {
172 | Navigator.of(context).pushReplacementNamed('/');
173 | }
174 |
175 | void onEnd() {
176 | if (meeting != null) {
177 | meeting.end();
178 | meeting = null;
179 | goToHome();
180 | }
181 | }
182 |
183 | void onLeave() {
184 | if (meeting != null) {
185 | meeting.leave();
186 | meeting = null;
187 | goToHome();
188 | }
189 | }
190 |
191 | void onVideoToggle() {
192 | if (meeting != null) {
193 | setState(() {
194 | meeting.toggleVideo();
195 | });
196 | }
197 | }
198 |
199 | void onAudioToggle() {
200 | if (meeting != null) {
201 | setState(() {
202 | meeting.toggleAudio();
203 | });
204 | }
205 | }
206 |
207 | bool isHost() {
208 | return meeting != null && widget.meetingDetail != null
209 | ? meeting.userId == widget.meetingDetail.hostId
210 | : false;
211 | }
212 |
213 | bool isVideoEnabled() {
214 | return meeting != null ? meeting.videoEnabled : false;
215 | }
216 |
217 | bool isAudioEnabled() {
218 | return meeting != null ? meeting.audioEnabled : false;
219 | }
220 |
221 | void _select(PopUpChoice choice) async {
222 | final meetingId = widget.meetingId;
223 | final snackBar = SnackBar(content: Text('Copied'));
224 | String text = '';
225 | if (choice.id == PopUpChoiceEnum.CopyId) {
226 | text = meetingId;
227 | } else if (choice.id == PopUpChoiceEnum.CopyLink) {
228 | text = 'https://meetx.madankumar.me/meeting/$meetingId';
229 | }
230 | await Clipboard.setData(ClipboardData(text: text));
231 | scaffoldKey.currentState.showSnackBar(snackBar);
232 | }
233 |
234 | void handleReconnect() {
235 | if (meeting != null) {
236 | meeting.reconnect();
237 | }
238 | }
239 |
240 | void handleChatToggle() {
241 | setState(() {
242 | isChatOpen = !isChatOpen;
243 | pageController.jumpToPage(isChatOpen ? 1 : 0);
244 | });
245 | }
246 |
247 | void handleSendMessage(String text) {
248 | if (meeting != null) {
249 | meeting.sendUserMessage(text);
250 | final message = MessageFormat(
251 | userId: meeting.userId,
252 | text: text,
253 | );
254 | setState(() {
255 | messages.add(message);
256 | });
257 | }
258 | }
259 |
260 | List _buildActions() {
261 | var widgets = [
262 | ActionButton(
263 | text: 'Leave',
264 | onPressed: onLeave,
265 | color: Colors.blue,
266 | ),
267 | ];
268 | if (isHost()) {
269 | widgets.add(
270 | ActionButton(
271 | text: 'End',
272 | onPressed: onEnd,
273 | color: Colors.red,
274 | ),
275 | );
276 | }
277 | widgets.add(PopupMenuButton(
278 | onSelected: _select,
279 | itemBuilder: (BuildContext context) {
280 | return choices.map((PopUpChoice choice) {
281 | return PopupMenuItem(
282 | value: choice,
283 | child: Text(choice.title),
284 | );
285 | }).toList();
286 | },
287 | ));
288 | return widgets;
289 | }
290 |
291 | Widget _buildMeetingRoom() {
292 | return Stack(
293 | children: [
294 | meeting != null &&
295 | meeting.connections != null &&
296 | meeting.connections.length > 0
297 | ? RemoteVideoPageView(
298 | connections: meeting.connections,
299 | )
300 | : Center(
301 | child: Text(
302 | 'Waiting for participants to join the meeting',
303 | textAlign: TextAlign.center,
304 | style: TextStyle(
305 | color: Colors.grey,
306 | fontSize: 24.0,
307 | ),
308 | ),
309 | ),
310 | Positioned(
311 | bottom: 10.0,
312 | right: 0.0,
313 | child: Container(
314 | width: 150.0,
315 | height: 200.0,
316 | child: RTCVideoView(_localRenderer),
317 | ),
318 | )
319 | ],
320 | );
321 | }
322 |
323 | @override
324 | Widget build(BuildContext context) {
325 | return Scaffold(
326 | key: scaffoldKey,
327 | appBar: AppBar(
328 | title: Text("MeetX"),
329 | actions: _buildActions(),
330 | backgroundColor: Colors.green,
331 | ),
332 | body: PageView(
333 | physics: NeverScrollableScrollPhysics(),
334 | controller: pageController,
335 | children: [
336 | _buildMeetingRoom(),
337 | ChatScreen(
338 | messages: messages,
339 | onSendMessage: handleSendMessage,
340 | connections: meeting.connections,
341 | userId: meeting.userId,
342 | userName: meeting.name,
343 | )
344 | ],
345 | ),
346 | bottomNavigationBar: ControlPanel(
347 | onAudioToggle: onAudioToggle,
348 | onVideoToggle: onVideoToggle,
349 | videoEnabled: isVideoEnabled(),
350 | audioEnabled: isAudioEnabled(),
351 | isConnectionFailed: isConnectionFailed,
352 | onReconnect: handleReconnect,
353 | onChatToggle: handleChatToggle,
354 | isChatOpen: isChatOpen,
355 | ),
356 | );
357 | }
358 | }
359 |
--------------------------------------------------------------------------------
/lib/sdk/meeting.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import 'package:eventify/eventify.dart';
4 | import 'package:flutter_webrtc/media_stream.dart';
5 | import 'package:flutter_webrtc/rtc_ice_candidate.dart';
6 | import 'package:flutter_webrtc/rtc_session_description.dart';
7 | import 'package:video_conferening_mobile/sdk/connection.dart';
8 | import 'package:video_conferening_mobile/sdk/message_format.dart';
9 | import 'package:video_conferening_mobile/sdk/message_payload.dart';
10 | import 'package:video_conferening_mobile/sdk/payload_data.dart';
11 | import 'package:video_conferening_mobile/sdk/transport.dart';
12 |
13 | class Meeting extends EventEmitter {
14 | final String url = 'wss://api.meetx.madankumar.me/websocket/meeting';
15 | // final String url = 'ws://10.0.2.2:8081/websocket/meeting';
16 | Transport transport;
17 | String meetingId;
18 | List connections = new List();
19 | bool joined = false;
20 | bool connected = false;
21 | MediaStream stream;
22 | String userId;
23 | String name;
24 | List messages = new List();
25 | bool videoEnabled = true;
26 | bool audioEnabled = true;
27 |
28 | Meeting({this.meetingId, this.userId, this.name, this.stream}) {
29 | this.transport = new Transport(
30 | url: formatUrl(this.meetingId),
31 | maxRetryCount: 3,
32 | canReconnect: true,
33 | );
34 | this.listenMessage();
35 | }
36 |
37 | String formatUrl(String id) {
38 | return '$url?id=$id';
39 | }
40 |
41 | MessagePayload parseMessage(dynamic data) {
42 | try {
43 | return MessagePayload.fromJson(json.decode(data));
44 | } catch (error) {
45 | return MessagePayload(type: 'unknown');
46 | }
47 | }
48 |
49 | void sendMessage(String type, dynamic data) {
50 | try {
51 | final String payload = json.encode({'type': type, 'data': data});
52 | if (transport != null) {
53 | transport.send(payload);
54 | }
55 | } catch (error) {
56 | print(error);
57 | }
58 | }
59 |
60 | void listenMessage() {
61 | if (transport != null) {
62 | transport.on('open', null, (ev, context) {
63 | connected = true;
64 | print(ev.eventName);
65 | join();
66 | });
67 | transport.on('message', null, (ev, context) {
68 | print(ev.eventData);
69 | final payload = parseMessage(ev.eventData);
70 | handleMessage(payload);
71 | });
72 | transport.on('closed', null, (ev, context) {
73 | connected = false;
74 | });
75 | transport.on('failed', null, (ev, context) {
76 | this.reset();
77 | this.emit('failed');
78 | });
79 | transport.connect();
80 | }
81 | }
82 |
83 | Connection getConnection(String userId) {
84 | return connections.firstWhere((connection) => connection.userId == userId,
85 | orElse: () => null);
86 | }
87 |
88 | Future createConnection(UserJoinedData data) async {
89 | if (stream != null) {
90 | final connection = new Connection(
91 | connectionType: 'incoming',
92 | userId: data.userId,
93 | name: data.name,
94 | stream: stream,
95 | audioEnabled: data.config.audioEnabled,
96 | videoEnabled: data.config.videoEnabled,
97 | );
98 | connection.on('connected', null, (ev, context) {
99 | print('rtp connected');
100 | });
101 | connection.on('candidate', null, (ev, context) {
102 | sendIceCandidate(connection.userId, ev.eventData);
103 | });
104 | connection.on('stream-changed', null, (ev, context) {
105 | this.emit('stream-changed');
106 | });
107 | connections.add(connection);
108 | await connection.start();
109 | this.emit('connection', null, connection);
110 | return connection;
111 | }
112 | return null;
113 | }
114 |
115 | void join() {
116 | this.sendMessage('join-meeting', {
117 | 'name': name,
118 | 'userId': userId,
119 | 'config': {
120 | 'audioEnabled': audioEnabled,
121 | 'videoEnabled': videoEnabled,
122 | },
123 | });
124 | }
125 |
126 | void joinedMeeting(JoinedMeetingData data) {
127 | joined = true;
128 | userId = data.userId;
129 | }
130 |
131 | void userJoined(UserJoinedData data) async {
132 | final connection = await createConnection(data);
133 | if (connection != null) {
134 | sendConnectionRequest(connection.userId);
135 | }
136 | }
137 |
138 | void sendIceCandidate(String otherUserId, RTCIceCandidate candidate) {
139 | sendMessage('icecandidate', {
140 | 'userId': userId,
141 | 'otherUserId': otherUserId,
142 | 'candidate': candidate.toMap(),
143 | });
144 | }
145 |
146 | void sendConnectionRequest(String otherUserId) {
147 | sendMessage('connection-request', {
148 | 'name': name,
149 | 'userId': userId,
150 | 'otherUserId': otherUserId,
151 | 'config': {
152 | 'audioEnabled': audioEnabled,
153 | 'videoEnabled': videoEnabled,
154 | },
155 | });
156 | }
157 |
158 | void receivedConnectionRequest(UserJoinedData data) async {
159 | final connection = await createConnection(data);
160 | if (connection != null) {
161 | sendOfferSdp(data.userId);
162 | }
163 | }
164 |
165 | void sendOfferSdp(String otherUserId) async {
166 | final connection = getConnection(otherUserId);
167 | if (connection != null) {
168 | final sdp = await connection.createOffer();
169 | sendMessage('offer-sdp', {
170 | 'userId': userId,
171 | 'otherUserId': otherUserId,
172 | 'sdp': sdp.toMap(),
173 | });
174 | }
175 | }
176 |
177 | void receivedOfferSdp(OfferSdpData data) {
178 | this.sendAnswerSdp(data.userId, data.sdp);
179 | }
180 |
181 | void sendAnswerSdp(String otherUserId, RTCSessionDescription sdp) async {
182 | final connection = getConnection(otherUserId);
183 | if (connection != null) {
184 | await connection.setOfferSdp(sdp);
185 | final answerSdp = await connection.createAnswer();
186 | sendMessage('answer-sdp', {
187 | 'userId': this.userId,
188 | 'otherUserId': otherUserId,
189 | 'sdp': answerSdp.toMap(),
190 | });
191 | }
192 | }
193 |
194 | void receivedAnswerSdp(AnswerSdpData data) async {
195 | final connection = getConnection(data.userId);
196 | if (connection != null) {
197 | await connection.setAnswerSdp(data.sdp);
198 | }
199 | }
200 |
201 | void setIceCandidate(IceCandidateData data) async {
202 | final connection = getConnection(data.userId);
203 | if (connection != null) {
204 | await connection.setCandidate(data.candidate);
205 | }
206 | }
207 |
208 | void userLeft(UserLeftData data) {
209 | final connection = getConnection(data.userId);
210 | if (connection != null) {
211 | this.emit('user-left', null, connection);
212 | connection.close();
213 | connections.removeWhere((element) => element.userId == connection.userId);
214 | }
215 | }
216 |
217 | void meetingEnded(MeetingEndedData data) {
218 | this.emit('ended');
219 | destroy();
220 | }
221 |
222 | void end() {
223 | sendMessage('end-meeting', {
224 | 'userId': this.userId,
225 | });
226 | destroy();
227 | }
228 |
229 | void leave() {
230 | sendMessage('leave-meeting', {
231 | 'userId': this.userId,
232 | });
233 | destroy();
234 | }
235 |
236 | bool toggleVideo() {
237 | if (stream != null) {
238 | final videoTrack = stream.getVideoTracks()[0];
239 | if (videoTrack != null) {
240 | final bool videoEnabled = videoTrack.enabled = !videoTrack.enabled;
241 | this.videoEnabled = videoEnabled;
242 | sendMessage('video-toggle', {
243 | 'userId': this.userId,
244 | 'videoEnabled': videoEnabled,
245 | });
246 | return videoEnabled;
247 | }
248 | }
249 | return false;
250 | }
251 |
252 | bool toggleAudio() {
253 | if (stream != null) {
254 | final audioTrack = stream.getAudioTracks()[0];
255 | if (audioTrack != null) {
256 | final bool audioEnabled = audioTrack.enabled = !audioTrack.enabled;
257 | this.audioEnabled = audioEnabled;
258 | sendMessage('audio-toggle', {
259 | 'userId': this.userId,
260 | 'audioEnabled': audioEnabled,
261 | });
262 | return audioEnabled;
263 | }
264 | }
265 | return false;
266 | }
267 |
268 | void listenVideoToggle(VideoToggleData data) {
269 | final connection = this.getConnection(data.userId);
270 | if (connection != null) {
271 | connection?.toggleVideo(data.videoEnabled);
272 | this.emit('connection-setting-changed');
273 | }
274 | }
275 |
276 | void listenAudioToggle(AudioToggleData data) {
277 | final connection = this.getConnection(data.userId);
278 | if (connection != null) {
279 | connection.toggleAudio(data.audioEnabled);
280 | this.emit('connection-setting-changed');
281 | }
282 | }
283 |
284 | void handleUserMessage(MessageData data) {
285 | this.messages.add(data.message);
286 | this.emit('message', null, data.message);
287 | }
288 |
289 | void sendUserMessage(String text) {
290 | sendMessage('message', {
291 | 'userId': this.userId,
292 | 'message': {
293 | 'userId': this.userId,
294 | 'text': text,
295 | },
296 | });
297 | }
298 |
299 | void handleNotFound() {
300 | this.emit('not-found');
301 | }
302 |
303 | stopStream() {
304 | if (stream != null) {
305 | stream.dispose();
306 | }
307 | }
308 |
309 | void handleMessage(MessagePayload payload) {
310 | switch (payload.type) {
311 | case 'joined-meeting':
312 | joinedMeeting(JoinedMeetingData.fromJson(payload.data));
313 | break;
314 | case 'user-joined':
315 | userJoined(UserJoinedData.fromJson(payload.data));
316 | break;
317 | case 'connection-request':
318 | receivedConnectionRequest(UserJoinedData.fromJson(payload.data));
319 | break;
320 | case 'offer-sdp':
321 | receivedOfferSdp(OfferSdpData.fromJson(payload.data));
322 | break;
323 | case 'answer-sdp':
324 | receivedAnswerSdp(AnswerSdpData.fromJson(payload.data));
325 | break;
326 | case 'user-left':
327 | userLeft(UserLeftData.fromJson(payload.data));
328 | break;
329 | case 'meeting-ended':
330 | meetingEnded(MeetingEndedData.fromJson(payload.data));
331 | break;
332 | case 'icecandidate':
333 | setIceCandidate(IceCandidateData.fromJson(payload.data));
334 | break;
335 | case 'video-toggle':
336 | listenVideoToggle(VideoToggleData.fromJson(payload.data));
337 | break;
338 | case 'audio-toggle':
339 | listenAudioToggle(AudioToggleData.fromJson(payload.data));
340 | break;
341 | case 'message':
342 | handleUserMessage(MessageData.fromJson(payload.data));
343 | break;
344 | case 'not-found':
345 | handleNotFound();
346 | break;
347 | default:
348 | break;
349 | }
350 | }
351 |
352 | void destroy() {
353 | if (transport != null) {
354 | transport.destroy();
355 | transport = null;
356 | }
357 | connections.forEach((connection) {
358 | connection.close();
359 | });
360 | stopStream();
361 | connections = [];
362 | connected = false;
363 | stream = null;
364 | joined = false;
365 | }
366 |
367 | void reset() {
368 | this.connections = new List();
369 | this.joined = false;
370 | this.connected = false;
371 | }
372 |
373 | void reconnect() {
374 | if (transport != null) {
375 | transport.reconnect();
376 | }
377 | }
378 | }
379 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
16 | /* End PBXBuildFile section */
17 |
18 | /* Begin PBXCopyFilesBuildPhase section */
19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
20 | isa = PBXCopyFilesBuildPhase;
21 | buildActionMask = 2147483647;
22 | dstPath = "";
23 | dstSubfolderSpec = 10;
24 | files = (
25 | );
26 | name = "Embed Frameworks";
27 | runOnlyForDeploymentPostprocessing = 0;
28 | };
29 | /* End PBXCopyFilesBuildPhase section */
30 |
31 | /* Begin PBXFileReference section */
32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
45 | /* End PBXFileReference section */
46 |
47 | /* Begin PBXFrameworksBuildPhase section */
48 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
49 | isa = PBXFrameworksBuildPhase;
50 | buildActionMask = 2147483647;
51 | files = (
52 | );
53 | runOnlyForDeploymentPostprocessing = 0;
54 | };
55 | /* End PBXFrameworksBuildPhase section */
56 |
57 | /* Begin PBXGroup section */
58 | 9740EEB11CF90186004384FC /* Flutter */ = {
59 | isa = PBXGroup;
60 | children = (
61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
65 | );
66 | name = Flutter;
67 | sourceTree = "";
68 | };
69 | 97C146E51CF9000F007C117D = {
70 | isa = PBXGroup;
71 | children = (
72 | 9740EEB11CF90186004384FC /* Flutter */,
73 | 97C146F01CF9000F007C117D /* Runner */,
74 | 97C146EF1CF9000F007C117D /* Products */,
75 | );
76 | sourceTree = "";
77 | };
78 | 97C146EF1CF9000F007C117D /* Products */ = {
79 | isa = PBXGroup;
80 | children = (
81 | 97C146EE1CF9000F007C117D /* Runner.app */,
82 | );
83 | name = Products;
84 | sourceTree = "";
85 | };
86 | 97C146F01CF9000F007C117D /* Runner */ = {
87 | isa = PBXGroup;
88 | children = (
89 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
92 | 97C147021CF9000F007C117D /* Info.plist */,
93 | 97C146F11CF9000F007C117D /* Supporting Files */,
94 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
95 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
96 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
97 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
98 | );
99 | path = Runner;
100 | sourceTree = "";
101 | };
102 | 97C146F11CF9000F007C117D /* Supporting Files */ = {
103 | isa = PBXGroup;
104 | children = (
105 | );
106 | name = "Supporting Files";
107 | sourceTree = "";
108 | };
109 | /* End PBXGroup section */
110 |
111 | /* Begin PBXNativeTarget section */
112 | 97C146ED1CF9000F007C117D /* Runner */ = {
113 | isa = PBXNativeTarget;
114 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
115 | buildPhases = (
116 | 9740EEB61CF901F6004384FC /* Run Script */,
117 | 97C146EA1CF9000F007C117D /* Sources */,
118 | 97C146EB1CF9000F007C117D /* Frameworks */,
119 | 97C146EC1CF9000F007C117D /* Resources */,
120 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
121 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
122 | );
123 | buildRules = (
124 | );
125 | dependencies = (
126 | );
127 | name = Runner;
128 | productName = Runner;
129 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
130 | productType = "com.apple.product-type.application";
131 | };
132 | /* End PBXNativeTarget section */
133 |
134 | /* Begin PBXProject section */
135 | 97C146E61CF9000F007C117D /* Project object */ = {
136 | isa = PBXProject;
137 | attributes = {
138 | LastUpgradeCheck = 1020;
139 | ORGANIZATIONNAME = "";
140 | TargetAttributes = {
141 | 97C146ED1CF9000F007C117D = {
142 | CreatedOnToolsVersion = 7.3.1;
143 | LastSwiftMigration = 1100;
144 | };
145 | };
146 | };
147 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
148 | compatibilityVersion = "Xcode 9.3";
149 | developmentRegion = en;
150 | hasScannedForEncodings = 0;
151 | knownRegions = (
152 | en,
153 | Base,
154 | );
155 | mainGroup = 97C146E51CF9000F007C117D;
156 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
157 | projectDirPath = "";
158 | projectRoot = "";
159 | targets = (
160 | 97C146ED1CF9000F007C117D /* Runner */,
161 | );
162 | };
163 | /* End PBXProject section */
164 |
165 | /* Begin PBXResourcesBuildPhase section */
166 | 97C146EC1CF9000F007C117D /* Resources */ = {
167 | isa = PBXResourcesBuildPhase;
168 | buildActionMask = 2147483647;
169 | files = (
170 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
171 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
172 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
173 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
174 | );
175 | runOnlyForDeploymentPostprocessing = 0;
176 | };
177 | /* End PBXResourcesBuildPhase section */
178 |
179 | /* Begin PBXShellScriptBuildPhase section */
180 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
181 | isa = PBXShellScriptBuildPhase;
182 | buildActionMask = 2147483647;
183 | files = (
184 | );
185 | inputPaths = (
186 | );
187 | name = "Thin Binary";
188 | outputPaths = (
189 | );
190 | runOnlyForDeploymentPostprocessing = 0;
191 | shellPath = /bin/sh;
192 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
193 | };
194 | 9740EEB61CF901F6004384FC /* Run Script */ = {
195 | isa = PBXShellScriptBuildPhase;
196 | buildActionMask = 2147483647;
197 | files = (
198 | );
199 | inputPaths = (
200 | );
201 | name = "Run Script";
202 | outputPaths = (
203 | );
204 | runOnlyForDeploymentPostprocessing = 0;
205 | shellPath = /bin/sh;
206 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
207 | };
208 | /* End PBXShellScriptBuildPhase section */
209 |
210 | /* Begin PBXSourcesBuildPhase section */
211 | 97C146EA1CF9000F007C117D /* Sources */ = {
212 | isa = PBXSourcesBuildPhase;
213 | buildActionMask = 2147483647;
214 | files = (
215 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
216 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
217 | );
218 | runOnlyForDeploymentPostprocessing = 0;
219 | };
220 | /* End PBXSourcesBuildPhase section */
221 |
222 | /* Begin PBXVariantGroup section */
223 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
224 | isa = PBXVariantGroup;
225 | children = (
226 | 97C146FB1CF9000F007C117D /* Base */,
227 | );
228 | name = Main.storyboard;
229 | sourceTree = "";
230 | };
231 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
232 | isa = PBXVariantGroup;
233 | children = (
234 | 97C147001CF9000F007C117D /* Base */,
235 | );
236 | name = LaunchScreen.storyboard;
237 | sourceTree = "";
238 | };
239 | /* End PBXVariantGroup section */
240 |
241 | /* Begin XCBuildConfiguration section */
242 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
243 | isa = XCBuildConfiguration;
244 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
245 | buildSettings = {
246 | ALWAYS_SEARCH_USER_PATHS = NO;
247 | CLANG_ANALYZER_NONNULL = YES;
248 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
249 | CLANG_CXX_LIBRARY = "libc++";
250 | CLANG_ENABLE_MODULES = YES;
251 | CLANG_ENABLE_OBJC_ARC = YES;
252 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
253 | CLANG_WARN_BOOL_CONVERSION = YES;
254 | CLANG_WARN_COMMA = YES;
255 | CLANG_WARN_CONSTANT_CONVERSION = YES;
256 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
257 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
258 | CLANG_WARN_EMPTY_BODY = YES;
259 | CLANG_WARN_ENUM_CONVERSION = YES;
260 | CLANG_WARN_INFINITE_RECURSION = YES;
261 | CLANG_WARN_INT_CONVERSION = YES;
262 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
263 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
264 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
265 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
266 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
267 | CLANG_WARN_STRICT_PROTOTYPES = YES;
268 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
269 | CLANG_WARN_UNREACHABLE_CODE = YES;
270 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
271 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
272 | COPY_PHASE_STRIP = NO;
273 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
274 | ENABLE_NS_ASSERTIONS = NO;
275 | ENABLE_STRICT_OBJC_MSGSEND = YES;
276 | GCC_C_LANGUAGE_STANDARD = gnu99;
277 | GCC_NO_COMMON_BLOCKS = YES;
278 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
279 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
280 | GCC_WARN_UNDECLARED_SELECTOR = YES;
281 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
282 | GCC_WARN_UNUSED_FUNCTION = YES;
283 | GCC_WARN_UNUSED_VARIABLE = YES;
284 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
285 | MTL_ENABLE_DEBUG_INFO = NO;
286 | SDKROOT = iphoneos;
287 | SUPPORTED_PLATFORMS = iphoneos;
288 | TARGETED_DEVICE_FAMILY = "1,2";
289 | VALIDATE_PRODUCT = YES;
290 | };
291 | name = Profile;
292 | };
293 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
294 | isa = XCBuildConfiguration;
295 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
296 | buildSettings = {
297 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
298 | CLANG_ENABLE_MODULES = YES;
299 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
300 | ENABLE_BITCODE = NO;
301 | FRAMEWORK_SEARCH_PATHS = (
302 | "$(inherited)",
303 | "$(PROJECT_DIR)/Flutter",
304 | );
305 | INFOPLIST_FILE = Runner/Info.plist;
306 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
307 | LIBRARY_SEARCH_PATHS = (
308 | "$(inherited)",
309 | "$(PROJECT_DIR)/Flutter",
310 | );
311 | PRODUCT_BUNDLE_IDENTIFIER = com.madankumar.videoConfereningMobile;
312 | PRODUCT_NAME = "$(TARGET_NAME)";
313 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
314 | SWIFT_VERSION = 5.0;
315 | VERSIONING_SYSTEM = "apple-generic";
316 | };
317 | name = Profile;
318 | };
319 | 97C147031CF9000F007C117D /* Debug */ = {
320 | isa = XCBuildConfiguration;
321 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
322 | buildSettings = {
323 | ALWAYS_SEARCH_USER_PATHS = NO;
324 | CLANG_ANALYZER_NONNULL = YES;
325 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
326 | CLANG_CXX_LIBRARY = "libc++";
327 | CLANG_ENABLE_MODULES = YES;
328 | CLANG_ENABLE_OBJC_ARC = YES;
329 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
330 | CLANG_WARN_BOOL_CONVERSION = YES;
331 | CLANG_WARN_COMMA = YES;
332 | CLANG_WARN_CONSTANT_CONVERSION = YES;
333 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
334 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
335 | CLANG_WARN_EMPTY_BODY = YES;
336 | CLANG_WARN_ENUM_CONVERSION = YES;
337 | CLANG_WARN_INFINITE_RECURSION = YES;
338 | CLANG_WARN_INT_CONVERSION = YES;
339 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
340 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
341 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
342 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
343 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
344 | CLANG_WARN_STRICT_PROTOTYPES = YES;
345 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
346 | CLANG_WARN_UNREACHABLE_CODE = YES;
347 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
348 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
349 | COPY_PHASE_STRIP = NO;
350 | DEBUG_INFORMATION_FORMAT = dwarf;
351 | ENABLE_STRICT_OBJC_MSGSEND = YES;
352 | ENABLE_TESTABILITY = YES;
353 | GCC_C_LANGUAGE_STANDARD = gnu99;
354 | GCC_DYNAMIC_NO_PIC = NO;
355 | GCC_NO_COMMON_BLOCKS = YES;
356 | GCC_OPTIMIZATION_LEVEL = 0;
357 | GCC_PREPROCESSOR_DEFINITIONS = (
358 | "DEBUG=1",
359 | "$(inherited)",
360 | );
361 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
362 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
363 | GCC_WARN_UNDECLARED_SELECTOR = YES;
364 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
365 | GCC_WARN_UNUSED_FUNCTION = YES;
366 | GCC_WARN_UNUSED_VARIABLE = YES;
367 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
368 | MTL_ENABLE_DEBUG_INFO = YES;
369 | ONLY_ACTIVE_ARCH = YES;
370 | SDKROOT = iphoneos;
371 | TARGETED_DEVICE_FAMILY = "1,2";
372 | };
373 | name = Debug;
374 | };
375 | 97C147041CF9000F007C117D /* Release */ = {
376 | isa = XCBuildConfiguration;
377 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
378 | buildSettings = {
379 | ALWAYS_SEARCH_USER_PATHS = NO;
380 | CLANG_ANALYZER_NONNULL = YES;
381 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
382 | CLANG_CXX_LIBRARY = "libc++";
383 | CLANG_ENABLE_MODULES = YES;
384 | CLANG_ENABLE_OBJC_ARC = YES;
385 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
386 | CLANG_WARN_BOOL_CONVERSION = YES;
387 | CLANG_WARN_COMMA = YES;
388 | CLANG_WARN_CONSTANT_CONVERSION = YES;
389 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
390 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
391 | CLANG_WARN_EMPTY_BODY = YES;
392 | CLANG_WARN_ENUM_CONVERSION = YES;
393 | CLANG_WARN_INFINITE_RECURSION = YES;
394 | CLANG_WARN_INT_CONVERSION = YES;
395 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
396 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
397 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
398 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
399 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
400 | CLANG_WARN_STRICT_PROTOTYPES = YES;
401 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
402 | CLANG_WARN_UNREACHABLE_CODE = YES;
403 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
404 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
405 | COPY_PHASE_STRIP = NO;
406 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
407 | ENABLE_NS_ASSERTIONS = NO;
408 | ENABLE_STRICT_OBJC_MSGSEND = YES;
409 | GCC_C_LANGUAGE_STANDARD = gnu99;
410 | GCC_NO_COMMON_BLOCKS = YES;
411 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
412 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
413 | GCC_WARN_UNDECLARED_SELECTOR = YES;
414 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
415 | GCC_WARN_UNUSED_FUNCTION = YES;
416 | GCC_WARN_UNUSED_VARIABLE = YES;
417 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
418 | MTL_ENABLE_DEBUG_INFO = NO;
419 | SDKROOT = iphoneos;
420 | SUPPORTED_PLATFORMS = iphoneos;
421 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
422 | TARGETED_DEVICE_FAMILY = "1,2";
423 | VALIDATE_PRODUCT = YES;
424 | };
425 | name = Release;
426 | };
427 | 97C147061CF9000F007C117D /* Debug */ = {
428 | isa = XCBuildConfiguration;
429 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
430 | buildSettings = {
431 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
432 | CLANG_ENABLE_MODULES = YES;
433 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
434 | ENABLE_BITCODE = NO;
435 | FRAMEWORK_SEARCH_PATHS = (
436 | "$(inherited)",
437 | "$(PROJECT_DIR)/Flutter",
438 | );
439 | INFOPLIST_FILE = Runner/Info.plist;
440 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
441 | LIBRARY_SEARCH_PATHS = (
442 | "$(inherited)",
443 | "$(PROJECT_DIR)/Flutter",
444 | );
445 | PRODUCT_BUNDLE_IDENTIFIER = com.madankumar.videoConfereningMobile;
446 | PRODUCT_NAME = "$(TARGET_NAME)";
447 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
448 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
449 | SWIFT_VERSION = 5.0;
450 | VERSIONING_SYSTEM = "apple-generic";
451 | };
452 | name = Debug;
453 | };
454 | 97C147071CF9000F007C117D /* Release */ = {
455 | isa = XCBuildConfiguration;
456 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
457 | buildSettings = {
458 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
459 | CLANG_ENABLE_MODULES = YES;
460 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
461 | ENABLE_BITCODE = NO;
462 | FRAMEWORK_SEARCH_PATHS = (
463 | "$(inherited)",
464 | "$(PROJECT_DIR)/Flutter",
465 | );
466 | INFOPLIST_FILE = Runner/Info.plist;
467 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
468 | LIBRARY_SEARCH_PATHS = (
469 | "$(inherited)",
470 | "$(PROJECT_DIR)/Flutter",
471 | );
472 | PRODUCT_BUNDLE_IDENTIFIER = com.madankumar.videoConfereningMobile;
473 | PRODUCT_NAME = "$(TARGET_NAME)";
474 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
475 | SWIFT_VERSION = 5.0;
476 | VERSIONING_SYSTEM = "apple-generic";
477 | };
478 | name = Release;
479 | };
480 | /* End XCBuildConfiguration section */
481 |
482 | /* Begin XCConfigurationList section */
483 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
484 | isa = XCConfigurationList;
485 | buildConfigurations = (
486 | 97C147031CF9000F007C117D /* Debug */,
487 | 97C147041CF9000F007C117D /* Release */,
488 | 249021D3217E4FDB00AE95B9 /* Profile */,
489 | );
490 | defaultConfigurationIsVisible = 0;
491 | defaultConfigurationName = Release;
492 | };
493 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
494 | isa = XCConfigurationList;
495 | buildConfigurations = (
496 | 97C147061CF9000F007C117D /* Debug */,
497 | 97C147071CF9000F007C117D /* Release */,
498 | 249021D4217E4FDB00AE95B9 /* Profile */,
499 | );
500 | defaultConfigurationIsVisible = 0;
501 | defaultConfigurationName = Release;
502 | };
503 | /* End XCConfigurationList section */
504 | };
505 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
506 | }
507 |
--------------------------------------------------------------------------------