├── .github
└── workflows
│ ├── release.yml
│ └── run_test.yml
├── .gitignore
├── .metadata
├── .run
├── Conference.run.xml
├── DataChannel.run.xml
├── Example.run.xml
├── Peer.run.xml
├── Play.run.xml
└── Publish.run.xml
├── .vscode
└── launch.json
├── CHANGELOG.md
├── LICENSE
├── README.md
├── analysis_options.yaml
├── android
├── .gitignore
├── build.gradle
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── src
│ └── main
│ ├── AndroidManifest.xml
│ └── kotlin
│ └── com
│ ├── example
│ └── ant_media_flutter
│ │ └── AntMediaFlutterPlugin.kt
│ └── feloh
│ └── ant_media_flutter
│ └── AntMediaFlutterPlugin.kt
├── example
└── SampleProject
│ ├── .gitignore
│ ├── .metadata
│ ├── README.md
│ ├── analysis_options.yaml
│ ├── android
│ ├── .gitignore
│ ├── app
│ │ ├── build.gradle
│ │ └── src
│ │ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── example
│ │ │ │ │ └── ant_media_flutter_example
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── res
│ │ │ │ ├── drawable-v21
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── drawable
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── values-night
│ │ │ │ └── styles.xml
│ │ │ │ └── values
│ │ │ │ └── styles.xml
│ │ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ └── settings.gradle
│ ├── integration_test
│ ├── test_conference.dart
│ ├── test_data_channel.dart
│ ├── test_helper.dart
│ ├── test_p2p.dart
│ ├── test_play.dart
│ └── test_publish.dart
│ ├── ios
│ ├── .gitignore
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ ├── Podfile
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ │ └── WorkspaceSettings.xcsettings
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ ├── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ │ ├── 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-83.5x83.5@2x.png
│ │ │ └── LaunchImage.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── LaunchImage.png
│ │ │ │ ├── LaunchImage@2x.png
│ │ │ │ ├── LaunchImage@3x.png
│ │ │ │ └── README.md
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── Runner-Bridging-Header.h
│ └── RunnerTests
│ │ └── RunnerTests.swift
│ ├── lib
│ ├── conference.dart
│ ├── datachannel.dart
│ ├── main.dart
│ ├── peer.dart
│ ├── play.dart
│ └── publish.dart
│ ├── linux
│ ├── .gitignore
│ ├── CMakeLists.txt
│ ├── flutter
│ │ ├── CMakeLists.txt
│ │ ├── generated_plugin_registrant.cc
│ │ ├── generated_plugin_registrant.h
│ │ └── generated_plugins.cmake
│ └── runner
│ │ ├── CMakeLists.txt
│ │ ├── main.cc
│ │ ├── my_application.cc
│ │ └── my_application.h
│ ├── macos
│ ├── .gitignore
│ ├── Flutter
│ │ ├── Flutter-Debug.xcconfig
│ │ ├── Flutter-Release.xcconfig
│ │ └── GeneratedPluginRegistrant.swift
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ └── xcshareddata
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── app_icon_1024.png
│ │ │ │ ├── app_icon_128.png
│ │ │ │ ├── app_icon_16.png
│ │ │ │ ├── app_icon_256.png
│ │ │ │ ├── app_icon_32.png
│ │ │ │ ├── app_icon_512.png
│ │ │ │ └── app_icon_64.png
│ │ ├── Base.lproj
│ │ │ └── MainMenu.xib
│ │ ├── Configs
│ │ │ ├── AppInfo.xcconfig
│ │ │ ├── Debug.xcconfig
│ │ │ ├── Release.xcconfig
│ │ │ └── Warnings.xcconfig
│ │ ├── DebugProfile.entitlements
│ │ ├── Info.plist
│ │ ├── MainFlutterWindow.swift
│ │ └── Release.entitlements
│ └── RunnerTests
│ │ └── RunnerTests.swift
│ ├── pubspec.lock
│ ├── pubspec.yaml
│ ├── test
│ ├── test_play.dart
│ ├── test_publish.dart
│ └── widget_test.dart
│ ├── web
│ ├── favicon.png
│ ├── icons
│ │ ├── Icon-192.png
│ │ ├── Icon-512.png
│ │ ├── Icon-maskable-192.png
│ │ └── Icon-maskable-512.png
│ ├── index.html
│ └── manifest.json
│ └── windows
│ ├── .gitignore
│ ├── CMakeLists.txt
│ ├── flutter
│ ├── CMakeLists.txt
│ ├── generated_plugin_registrant.cc
│ ├── generated_plugin_registrant.h
│ └── generated_plugins.cmake
│ └── runner
│ ├── CMakeLists.txt
│ ├── Runner.rc
│ ├── flutter_window.cpp
│ ├── flutter_window.h
│ ├── main.cpp
│ ├── resource.h
│ ├── resources
│ └── app_icon.ico
│ ├── runner.exe.manifest
│ ├── utils.cpp
│ ├── utils.h
│ ├── win32_window.cpp
│ └── win32_window.h
├── images
├── README.md
├── flutter_sdk_inapp_0.jpeg
├── flutter_sdk_inapp_1.jpeg
└── flutter_sdk_inapp_2.jpg
├── ios
├── .gitignore
├── Assets
│ └── .gitkeep
├── Classes
│ ├── AntMediaFlutterPlugin.h
│ ├── AntMediaFlutterPlugin.m
│ └── SwiftAntMediaFlutterPlugin.swift
└── ant_media_flutter.podspec
├── lib
├── ant_media_flutter.dart
├── ant_media_flutter_web.dart
└── src
│ ├── helpers
│ └── helper.dart
│ └── utils
│ ├── conference_widget
│ └── playwidget.dart
│ ├── websocket.dart
│ └── websocket_web.dart
├── pub_login.sh
├── pubspec.yaml
└── test
└── permission_test.dart
/.github/workflows/release.yml:
--------------------------------------------------------------------------------
1 | name: Publish Package
2 |
3 | on:
4 | push:
5 | branches: [ main ]
6 |
7 | jobs:
8 | build:
9 | runs-on: ubuntu-latest
10 | if: contains(github.event.head_commit.message, 'release')
11 |
12 | steps:
13 | - uses: actions/checkout@v3
14 | - name: Set up JDK 17
15 | uses: actions/setup-java@v3
16 | with:
17 | distribution: 'zulu'
18 | java-version: '17'
19 |
20 | - name: Install Flutter
21 | uses: subosito/flutter-action@v2
22 | with:
23 | channel: 'stable'
24 |
25 | - name: Setup Pub Credentials
26 | shell: bash
27 | env:
28 | PUB_DEV_PUBLISH_ACCESS_TOKEN: ${{ secrets.PUB_DEV_PUBLISH_ACCESS_TOKEN }}
29 | PUB_DEV_PUBLISH_REFRESH_TOKEN: ${{ secrets.PUB_DEV_PUBLISH_REFRESH_TOKEN }}
30 | PUB_DEV_PUBLISH_TOKEN_ENDPOINT: ${{ secrets.PUB_DEV_PUBLISH_TOKEN_ENDPOINT }}
31 | PUB_DEV_PUBLISH_EXPIRATION: ${{ secrets.PUB_DEV_PUBLISH_EXPIRATION }}
32 | run: |
33 | sh ./pub_login.sh
34 |
35 | - name: Check Publish Warnings
36 | run: |
37 | sudo cat /$HOME/.config/dart/pub-credentials.json
38 | flutter pub publish --dry-run
39 |
40 | - name: Publish Package
41 | run: |
42 | yes | flutter pub publish
--------------------------------------------------------------------------------
/.github/workflows/run_test.yml:
--------------------------------------------------------------------------------
1 |
2 | name: Run Test Cases
3 |
4 | on: [pull_request]
5 |
6 |
7 | jobs:
8 | build:
9 | runs-on: ubuntu-latest
10 |
11 | steps:
12 | - uses: actions/checkout@v3
13 |
14 | - name: Set up JDK 17
15 | uses: actions/setup-java@v3
16 | with:
17 | distribution: 'zulu'
18 | java-version: '17'
19 |
20 | - name: Install Flutter
21 | uses: subosito/flutter-action@v2
22 | with:
23 | channel: 'stable'
24 |
25 | - name: Enable KVM group perms
26 | run: |
27 | echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
28 | sudo udevadm control --reload-rules
29 | sudo udevadm trigger --name-match=kvm
30 | sudo apt-get -y install android-tools-adb
31 |
32 |
33 | - name: Run sample application integration tests
34 | uses: reactivecircus/android-emulator-runner@v2
35 | with:
36 | api-level: 29
37 | script: |
38 | cd example/SampleProject && flutter test integration_test/test_play.dart
39 | cd example/SampleProject && flutter test integration_test/test_conference.dart
40 |
--------------------------------------------------------------------------------
/.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 | # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
25 | /pubspec.lock
26 | **/doc/api/
27 | .dart_tool/
28 | .packages
29 | build/
30 |
--------------------------------------------------------------------------------
/.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: 097d3313d8e2c7f901932d63e537c1acefb87800
8 | channel: stable
9 |
10 | project_type: plugin
11 |
--------------------------------------------------------------------------------
/.run/Conference.run.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.run/DataChannel.run.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.run/Example.run.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.run/Peer.run.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.run/Play.run.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.run/Publish.run.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 |
8 |
9 | {
10 | "name": "Example",
11 | "cwd": "example",
12 | "request": "launch",
13 | "type": "dart"
14 | },
15 | {
16 | "name": "Example (profile mode)",
17 | "cwd": "example",
18 | "request": "launch",
19 | "type": "dart",
20 | "flutterMode": "profile"
21 | },
22 | {
23 | "name": "Example (release mode)",
24 | "cwd": "example",
25 | "request": "launch",
26 | "type": "dart",
27 | "flutterMode": "release"
28 | },
29 | {
30 | "name": "Conference",
31 | "cwd": "samples/Conference",
32 | "request": "launch",
33 | "type": "dart"
34 | },
35 | {
36 | "name": "Conference (profile mode)",
37 | "cwd": "samples/Conference",
38 | "request": "launch",
39 | "type": "dart",
40 | "flutterMode": "profile"
41 | },
42 | {
43 | "name": "Conference (release mode)",
44 | "cwd": "samples/Conference",
45 | "request": "launch",
46 | "type": "dart",
47 | "flutterMode": "release"
48 | },
49 | {
50 | "name": "Peer",
51 | "cwd": "samples/Peer",
52 | "request": "launch",
53 | "type": "dart"
54 | },
55 | {
56 | "name": "Peer (profile mode)",
57 | "cwd": "samples/Peer",
58 | "request": "launch",
59 | "type": "dart",
60 | "flutterMode": "profile"
61 | },
62 | {
63 | "name": "Peer (release mode)",
64 | "cwd": "samples/Peer",
65 | "request": "launch",
66 | "type": "dart",
67 | "flutterMode": "release"
68 | },
69 | {
70 | "name": "Play",
71 | "cwd": "samples/Play",
72 | "request": "launch",
73 | "type": "dart"
74 | },
75 | {
76 | "name": "Play (profile mode)",
77 | "cwd": "samples/Play",
78 | "request": "launch",
79 | "type": "dart",
80 | "flutterMode": "profile"
81 | },
82 | {
83 | "name": "Play (release mode)",
84 | "cwd": "samples/Play",
85 | "request": "launch",
86 | "type": "dart",
87 | "flutterMode": "release"
88 | },
89 | {
90 | "name": "Publish",
91 | "cwd": "samples/Publish",
92 | "request": "launch",
93 | "type": "dart"
94 | },
95 | {
96 | "name": "Publish (profile mode)",
97 | "cwd": "samples/Publish",
98 | "request": "launch",
99 | "type": "dart",
100 | "flutterMode": "profile"
101 | },
102 | {
103 | "name": "Publish (release mode)",
104 | "cwd": "samples/Publish",
105 | "request": "launch",
106 | "type": "dart",
107 | "flutterMode": "release"
108 | },
109 |
110 | {
111 | "name": "DataChannel",
112 | "cwd": "samples/DataChannel",
113 | "request": "launch",
114 | "type": "dart"
115 | },
116 | {
117 | "name": "DataChannel (profile mode)",
118 | "cwd": "samples/DataChannel",
119 | "request": "launch",
120 | "type": "dart",
121 | "flutterMode": "profile"
122 | },
123 | {
124 | "name": "DataChannel (release mode)",
125 | "cwd": "samples/DataChannel",
126 | "request": "launch",
127 | "type": "dart",
128 | "flutterMode": "release"
129 | }
130 | ]
131 | }
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 1.5.3
2 | - **FIX**: update WebRTC library add abr
3 |
4 | ## 1.5.2
5 | - **FIX**: Add namespace to plugin as required by gradle.
6 |
7 | ## 1.5.1
8 | - **FIX**: Update WebRTC library version.
9 |
10 | ## 1.5.0
11 | - **ENHAN**: Add manuel publish option.
12 |
13 | ## 1.4.4
14 | - **FIX**: Fix the data channel connectivity issue.
15 |
16 | ## 1.4.3
17 | - **FIX**: Fix the C++ onTrack failed error on Android Devices.
18 |
19 | ## 1.4.2
20 | - **ENHAN**: Cleanup duplicated samples.
21 |
22 | ## 1.4.1
23 | - **FIX**: Update WebRTC library version.
24 |
25 | ## 1.4.0
26 | - **FEAT**: Migrate to the unified plan and implement multitrack conference
27 | - **FIX**: Fix the playback issue.
28 |
29 | ## 1.3.2
30 | - **FIX**: Fix the token cannot pass issue.
31 |
32 | ## 1.3.1
33 | - **FIX**: Fix the websocket connection closed issue in case of there is no participant in the room.
34 |
35 | ## 1.3.0
36 | - **ENHAN**: Add multitrack conference solution.
37 | - **NOTE**: Minimum compatible Ant Media Server version is 2.8.0
38 |
39 | ## 1.2.1
40 | - **FIX**: Make samples compatible with web and fix push notification type error.
41 |
42 | ## 1.2.0
43 | - **FEAT**: Add sending push notification from sdk.
44 |
45 | ## 1.0.10
46 | - **FIX**: Fix broken images in README.md.
47 |
48 | ## 1.0.9
49 | - **ENHAN**: Update README.md file with complate function list.
50 |
51 | ## 1.0.8
52 | - **FIX**: Fix an issue which prevents the sdk from working on the mobile devices
53 |
54 | ## 1.0.7
55 | - **FIX**: Fix the issue of not being able to use sdk on the web
56 |
57 | ## 1.0.6
58 | - **ENHAN**: Update dependencies
59 |
60 | ## 1.0.5
61 | - **FEAT**: Webrtc client lib updated added option to : force stream quality , fix IOS screen rotation and audio issues
62 |
63 | ## 1.0.4
64 |
65 | - **ENHAN**: Update WebRTC stack
66 |
67 | ## 1.0.3
68 |
69 | - **FIX**: Fix conference widget issue and Bring back dart 3 compatibility
70 |
71 | ## 1.0.2
72 |
73 | - **FIX**: Fix DataChannel and make ice servers configurable
74 |
75 | ## 1.0.1
76 |
77 | - **FIX**: CI problems
78 |
79 | ## 1.0.0
80 |
81 | - **FEAT**: Increase flutter_webrtc version, add web support
82 |
83 | ## 0.0.8
84 |
85 | - **ENHAN**: Updated sample's code
86 |
87 | ## 0.0.7
88 |
89 | - **REFAC**: Removed unnecessary code
90 |
91 | ## 0.0.6
92 |
93 | - **REFAC**: Updated readme.md file , removed signaling class
94 |
95 | ## 0.0.5
96 |
97 | - **FEAT**: Data Channel implemented, Updated the sdk usability, Call screen's UI can be customised.
98 |
99 | ## 0.0.4
100 |
101 | - **ENHA**: Update sdk-code structure and optimize a code, And create a common helper class for all functions
102 |
103 | ## 0.0.3
104 |
105 | - **FIX**: Resolve Switch Camera and Mic issue in SDK & Samples
106 |
107 | ## 0.0.2
108 |
109 | - **ENHA**: Correction in Samples
110 |
111 | ## 0.0.1
112 |
113 | - **INIT**: Initial Release
114 |
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | include: package:flutter_lints/flutter.yaml
2 |
3 | # Additional information about this file can be found at
4 | # https://dart.dev/guides/language/analysis-options
5 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | group 'com.example.ant_media_flutter'
2 | version '1.0-SNAPSHOT'
3 |
4 | buildscript {
5 | ext.kotlin_version = '1.6.10'
6 | repositories {
7 | google()
8 | mavenCentral()
9 | }
10 |
11 | dependencies {
12 | classpath 'com.android.tools.build:gradle:4.1.0'
13 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
14 | }
15 | }
16 |
17 | rootProject.allprojects {
18 | repositories {
19 | google()
20 | mavenCentral()
21 | }
22 | }
23 |
24 | apply plugin: 'com.android.library'
25 | apply plugin: 'kotlin-android'
26 |
27 | android {
28 | compileSdkVersion 31
29 | namespace "com.example.ant_media_flutter"
30 |
31 | compileOptions {
32 | sourceCompatibility JavaVersion.VERSION_1_8
33 | targetCompatibility JavaVersion.VERSION_1_8
34 | }
35 |
36 | kotlinOptions {
37 | jvmTarget = '1.8'
38 | }
39 |
40 | sourceSets {
41 | main.java.srcDirs += 'src/main/kotlin'
42 | }
43 |
44 | defaultConfig {
45 | minSdkVersion 16
46 | }
47 | }
48 |
49 | dependencies {
50 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
51 | }
52 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ant-media/WebRTC-Flutter-SDK/02e0967d87e19b9945f6d3f6a114b788c1490b49/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | #
4 | # Copyright 2015 the original author or authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # https://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | ##
21 | ## Gradle start up script for UN*X
22 | ##
23 | ##############################################################################
24 |
25 | # Attempt to set APP_HOME
26 | # Resolve links: $0 may be a link
27 | PRG="$0"
28 | # Need this for relative symlinks.
29 | while [ -h "$PRG" ] ; do
30 | ls=`ls -ld "$PRG"`
31 | link=`expr "$ls" : '.*-> \(.*\)$'`
32 | if expr "$link" : '/.*' > /dev/null; then
33 | PRG="$link"
34 | else
35 | PRG=`dirname "$PRG"`"/$link"
36 | fi
37 | done
38 | SAVED="`pwd`"
39 | cd "`dirname \"$PRG\"`/" >/dev/null
40 | APP_HOME="`pwd -P`"
41 | cd "$SAVED" >/dev/null
42 |
43 | APP_NAME="Gradle"
44 | APP_BASE_NAME=`basename "$0"`
45 |
46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48 |
49 | # Use the maximum available, or set MAX_FD != -1 to use that value.
50 | MAX_FD="maximum"
51 |
52 | warn () {
53 | echo "$*"
54 | }
55 |
56 | die () {
57 | echo
58 | echo "$*"
59 | echo
60 | exit 1
61 | }
62 |
63 | # OS specific support (must be 'true' or 'false').
64 | cygwin=false
65 | msys=false
66 | darwin=false
67 | nonstop=false
68 | case "`uname`" in
69 | CYGWIN* )
70 | cygwin=true
71 | ;;
72 | Darwin* )
73 | darwin=true
74 | ;;
75 | MSYS* | MINGW* )
76 | msys=true
77 | ;;
78 | NONSTOP* )
79 | nonstop=true
80 | ;;
81 | esac
82 |
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84 |
85 |
86 | # Determine the Java command to use to start the JVM.
87 | if [ -n "$JAVA_HOME" ] ; then
88 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
89 | # IBM's JDK on AIX uses strange locations for the executables
90 | JAVACMD="$JAVA_HOME/jre/sh/java"
91 | else
92 | JAVACMD="$JAVA_HOME/bin/java"
93 | fi
94 | if [ ! -x "$JAVACMD" ] ; then
95 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
96 |
97 | Please set the JAVA_HOME variable in your environment to match the
98 | location of your Java installation."
99 | fi
100 | else
101 | JAVACMD="java"
102 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
103 |
104 | Please set the JAVA_HOME variable in your environment to match the
105 | location of your Java installation."
106 | fi
107 |
108 | # Increase the maximum file descriptors if we can.
109 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
110 | MAX_FD_LIMIT=`ulimit -H -n`
111 | if [ $? -eq 0 ] ; then
112 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
113 | MAX_FD="$MAX_FD_LIMIT"
114 | fi
115 | ulimit -n $MAX_FD
116 | if [ $? -ne 0 ] ; then
117 | warn "Could not set maximum file descriptor limit: $MAX_FD"
118 | fi
119 | else
120 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
121 | fi
122 | fi
123 |
124 | # For Darwin, add options to specify how the application appears in the dock
125 | if $darwin; then
126 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
127 | fi
128 |
129 | # For Cygwin or MSYS, switch paths to Windows format before running java
130 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
131 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
132 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
133 |
134 | JAVACMD=`cygpath --unix "$JAVACMD"`
135 |
136 | # We build the pattern for arguments to be converted via cygpath
137 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
138 | SEP=""
139 | for dir in $ROOTDIRSRAW ; do
140 | ROOTDIRS="$ROOTDIRS$SEP$dir"
141 | SEP="|"
142 | done
143 | OURCYGPATTERN="(^($ROOTDIRS))"
144 | # Add a user-defined pattern to the cygpath arguments
145 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
146 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
147 | fi
148 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
149 | i=0
150 | for arg in "$@" ; do
151 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
152 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
153 |
154 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
155 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
156 | else
157 | eval `echo args$i`="\"$arg\""
158 | fi
159 | i=`expr $i + 1`
160 | done
161 | case $i in
162 | 0) set -- ;;
163 | 1) set -- "$args0" ;;
164 | 2) set -- "$args0" "$args1" ;;
165 | 3) set -- "$args0" "$args1" "$args2" ;;
166 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
167 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
168 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
169 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
170 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
171 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
172 | esac
173 | fi
174 |
175 | # Escape application args
176 | save () {
177 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
178 | echo " "
179 | }
180 | APP_ARGS=`save "$@"`
181 |
182 | # Collect all arguments for the java command, following the shell quoting and substitution rules
183 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
184 |
185 | exec "$JAVACMD" "$@"
186 |
--------------------------------------------------------------------------------
/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34 |
35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37 |
38 | @rem Find java.exe
39 | if defined JAVA_HOME goto findJavaFromJavaHome
40 |
41 | set JAVA_EXE=java.exe
42 | %JAVA_EXE% -version >NUL 2>&1
43 | if "%ERRORLEVEL%" == "0" goto execute
44 |
45 | echo.
46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47 | echo.
48 | echo Please set the JAVA_HOME variable in your environment to match the
49 | echo location of your Java installation.
50 |
51 | goto fail
52 |
53 | :findJavaFromJavaHome
54 | set JAVA_HOME=%JAVA_HOME:"=%
55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56 |
57 | if exist "%JAVA_EXE%" goto execute
58 |
59 | echo.
60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61 | echo.
62 | echo Please set the JAVA_HOME variable in your environment to match the
63 | echo location of your Java installation.
64 |
65 | goto fail
66 |
67 | :execute
68 | @rem Setup the command line
69 |
70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71 |
72 |
73 | @rem Execute Gradle
74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75 |
76 | :end
77 | @rem End local scope for the variables with windows NT shell
78 | if "%ERRORLEVEL%"=="0" goto mainEnd
79 |
80 | :fail
81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82 | rem the _cmd.exe /c_ return code!
83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84 | exit /b 1
85 |
86 | :mainEnd
87 | if "%OS%"=="Windows_NT" endlocal
88 |
89 | :omega
90 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'ant_media_flutter'
2 |
--------------------------------------------------------------------------------
/android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
--------------------------------------------------------------------------------
/android/src/main/kotlin/com/example/ant_media_flutter/AntMediaFlutterPlugin.kt:
--------------------------------------------------------------------------------
1 | package com.example.ant_media_flutter
2 |
3 | import androidx.annotation.NonNull
4 |
5 | import io.flutter.embedding.engine.plugins.FlutterPlugin
6 | import io.flutter.plugin.common.MethodCall
7 | import io.flutter.plugin.common.MethodChannel
8 | import io.flutter.plugin.common.MethodChannel.MethodCallHandler
9 | import io.flutter.plugin.common.MethodChannel.Result
10 |
11 | /** AntMediaFlutterPlugin */
12 | class AntMediaFlutterPlugin: FlutterPlugin, MethodCallHandler {
13 | /// The MethodChannel that will the communication between Flutter and native Android
14 | ///
15 | /// This local reference serves to register the plugin with the Flutter Engine and unregister it
16 | /// when the Flutter Engine is detached from the Activity
17 | private lateinit var channel : MethodChannel
18 |
19 | override fun onAttachedToEngine(@NonNull flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) {
20 | channel = MethodChannel(flutterPluginBinding.binaryMessenger, "ant_media_flutter")
21 | channel.setMethodCallHandler(this)
22 | }
23 |
24 | override fun onMethodCall(@NonNull call: MethodCall, @NonNull result: Result) {
25 | if (call.method == "getPlatformVersion") {
26 | result.success("Android ${android.os.Build.VERSION.RELEASE}")
27 | } else {
28 | result.notImplemented()
29 | }
30 | }
31 |
32 | override fun onDetachedFromEngine(@NonNull binding: FlutterPlugin.FlutterPluginBinding) {
33 | channel.setMethodCallHandler(null)
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/android/src/main/kotlin/com/feloh/ant_media_flutter/AntMediaFlutterPlugin.kt:
--------------------------------------------------------------------------------
1 | package com.feloh.ant_media_flutter
2 |
3 | import androidx.annotation.NonNull
4 |
5 | import io.flutter.embedding.engine.plugins.FlutterPlugin
6 | import io.flutter.plugin.common.MethodCall
7 | import io.flutter.plugin.common.MethodChannel
8 | import io.flutter.plugin.common.MethodChannel.MethodCallHandler
9 | import io.flutter.plugin.common.MethodChannel.Result
10 |
11 | /** AntMediaFlutterPlugin */
12 | class AntMediaFlutterPlugin: FlutterPlugin, MethodCallHandler {
13 | /// The MethodChannel that will the communication between Flutter and native Android
14 | ///
15 | /// This local reference serves to register the plugin with the Flutter Engine and unregister it
16 | /// when the Flutter Engine is detached from the Activity
17 | private lateinit var channel : MethodChannel
18 |
19 | override fun onAttachedToEngine(@NonNull flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) {
20 | channel = MethodChannel(flutterPluginBinding.binaryMessenger, "ant_media_flutter")
21 | channel.setMethodCallHandler(this)
22 | }
23 |
24 | override fun onMethodCall(@NonNull call: MethodCall, @NonNull result: Result) {
25 | if (call.method == "getPlatformVersion") {
26 | result.success("Android ${android.os.Build.VERSION.RELEASE}")
27 | } else {
28 | result.notImplemented()
29 | }
30 | }
31 |
32 | override fun onDetachedFromEngine(@NonNull binding: FlutterPlugin.FlutterPluginBinding) {
33 | channel.setMethodCallHandler(null)
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/example/SampleProject/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .build/
9 | .buildlog/
10 | .history
11 | .svn/
12 | .swiftpm/
13 | migrate_working_dir/
14 |
15 | # IntelliJ related
16 | *.iml
17 | *.ipr
18 | *.iws
19 | .idea/
20 |
21 | # The .vscode folder contains launch configuration and tasks you configure in
22 | # VS Code which you may wish to be included in version control, so this line
23 | # is commented out by default.
24 | #.vscode/
25 |
26 | # Flutter/Dart/Pub related
27 | **/doc/api/
28 | **/ios/Flutter/.last_build_id
29 | .dart_tool/
30 | .flutter-plugins
31 | .flutter-plugins-dependencies
32 | .pub-cache/
33 | .pub/
34 | /build/
35 |
36 | # Symbolication related
37 | app.*.symbols
38 |
39 | # Obfuscation related
40 | app.*.map.json
41 |
42 | # Android Studio will place build artifacts here
43 | /android/app/debug
44 | /android/app/profile
45 | /android/app/release
46 |
--------------------------------------------------------------------------------
/example/SampleProject/.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: "17025dd88227cd9532c33fa78f5250d548d87e9a"
8 | channel: "stable"
9 |
10 | project_type: app
11 |
12 | # Tracks metadata for the flutter migrate command
13 | migration:
14 | platforms:
15 | - platform: root
16 | create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
17 | base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
18 | - platform: android
19 | create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
20 | base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
21 | - platform: ios
22 | create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
23 | base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
24 | - platform: linux
25 | create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
26 | base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
27 | - platform: macos
28 | create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
29 | base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
30 | - platform: web
31 | create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
32 | base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
33 | - platform: windows
34 | create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
35 | base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
36 |
37 | # User provided section
38 |
39 | # List of Local paths (relative to this file) that should be
40 | # ignored by the migrate tool.
41 | #
42 | # Files that are not part of the templates will be ignored by default.
43 | unmanaged_files:
44 | - 'lib/main.dart'
45 | - 'ios/Runner.xcodeproj/project.pbxproj'
46 |
--------------------------------------------------------------------------------
/example/SampleProject/README.md:
--------------------------------------------------------------------------------
1 | # ant_media_flutter_example
2 |
3 | A new Flutter project.
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://docs.flutter.dev/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
13 |
14 | For help getting started with Flutter development, view the
15 | [online documentation](https://docs.flutter.dev/), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/example/SampleProject/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | # This file configures the analyzer, which statically analyzes Dart code to
2 | # check for errors, warnings, and lints.
3 | #
4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6 | # invoked from the command line by running `flutter analyze`.
7 |
8 | # The following line activates a set of recommended lints for Flutter apps,
9 | # packages, and plugins designed to encourage good coding practices.
10 | include: package:flutter_lints/flutter.yaml
11 |
12 | linter:
13 | # The lint rules applied to this project can be customized in the
14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml`
15 | # included above or to enable additional rules. A list of all available lints
16 | # and their documentation is published at https://dart.dev/lints.
17 | #
18 | # Instead of disabling a lint rule for the entire project in the
19 | # section below, it can also be suppressed for a single line of code
20 | # or a specific dart file by using the `// ignore: name_of_lint` and
21 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file
22 | # producing the lint.
23 | rules:
24 | # avoid_print: false # Uncomment to disable the `avoid_print` rule
25 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
26 |
27 | # Additional information about this file can be found at
28 | # https://dart.dev/guides/language/analysis-options
29 |
--------------------------------------------------------------------------------
/example/SampleProject/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/to/reference-keystore
11 | key.properties
12 | **/*.keystore
13 | **/*.jks
14 |
--------------------------------------------------------------------------------
/example/SampleProject/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id "com.android.application"
3 | id "kotlin-android"
4 | // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
5 | id "dev.flutter.flutter-gradle-plugin"
6 | }
7 |
8 | android {
9 | namespace = "com.example.ant_media_flutter_example"
10 | compileSdk = flutter.compileSdkVersion
11 | ndkVersion = flutter.ndkVersion
12 |
13 | compileOptions {
14 | sourceCompatibility = JavaVersion.VERSION_1_8
15 | targetCompatibility = JavaVersion.VERSION_1_8
16 | }
17 |
18 | kotlinOptions {
19 | jvmTarget = JavaVersion.VERSION_1_8
20 | }
21 |
22 | defaultConfig {
23 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
24 | applicationId = "com.example.ant_media_flutter_example"
25 | // You can update the following values to match your application needs.
26 | // For more information, see: https://flutter.dev/to/review-gradle-config.
27 | minSdk = flutter.minSdkVersion
28 | targetSdk = flutter.targetSdkVersion
29 | versionCode = flutter.versionCode
30 | versionName = flutter.versionName
31 | }
32 |
33 | buildTypes {
34 | release {
35 | // TODO: Add your own signing config for the release build.
36 | // Signing with the debug keys for now, so `flutter run --release` works.
37 | signingConfig = signingConfigs.debug
38 | }
39 | }
40 | }
41 |
42 | flutter {
43 | source = "../.."
44 | }
45 |
--------------------------------------------------------------------------------
/example/SampleProject/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/SampleProject/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
32 |
40 |
44 |
48 |
49 |
50 |
51 |
52 |
53 |
55 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/example/SampleProject/android/app/src/main/kotlin/com/example/ant_media_flutter_example/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.ant_media_flutter_example
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity()
6 |
--------------------------------------------------------------------------------
/example/SampleProject/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/SampleProject/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/SampleProject/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ant-media/WebRTC-Flutter-SDK/02e0967d87e19b9945f6d3f6a114b788c1490b49/example/SampleProject/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/SampleProject/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ant-media/WebRTC-Flutter-SDK/02e0967d87e19b9945f6d3f6a114b788c1490b49/example/SampleProject/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/SampleProject/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ant-media/WebRTC-Flutter-SDK/02e0967d87e19b9945f6d3f6a114b788c1490b49/example/SampleProject/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/SampleProject/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ant-media/WebRTC-Flutter-SDK/02e0967d87e19b9945f6d3f6a114b788c1490b49/example/SampleProject/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/SampleProject/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ant-media/WebRTC-Flutter-SDK/02e0967d87e19b9945f6d3f6a114b788c1490b49/example/SampleProject/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/SampleProject/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/example/SampleProject/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/example/SampleProject/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/SampleProject/android/build.gradle:
--------------------------------------------------------------------------------
1 | allprojects {
2 | repositories {
3 | google()
4 | mavenCentral()
5 | }
6 | }
7 |
8 | rootProject.buildDir = "../build"
9 | subprojects {
10 | project.buildDir = "${rootProject.buildDir}/${project.name}"
11 | }
12 | subprojects {
13 | project.evaluationDependsOn(":app")
14 | }
15 |
16 | tasks.register("clean", Delete) {
17 | delete rootProject.buildDir
18 | }
19 |
--------------------------------------------------------------------------------
/example/SampleProject/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/example/SampleProject/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
6 |
7 |
--------------------------------------------------------------------------------
/example/SampleProject/android/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | def flutterSdkPath = {
3 | def properties = new Properties()
4 | file("local.properties").withInputStream { properties.load(it) }
5 | def flutterSdkPath = properties.getProperty("flutter.sdk")
6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7 | return flutterSdkPath
8 | }()
9 |
10 | includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
11 |
12 | repositories {
13 | google()
14 | mavenCentral()
15 | gradlePluginPortal()
16 | }
17 | }
18 |
19 | plugins {
20 | id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21 | id "com.android.application" version "8.1.0" apply false
22 | id "org.jetbrains.kotlin.android" version "1.8.22" apply false
23 | }
24 |
25 | include ":app"
26 |
--------------------------------------------------------------------------------
/example/SampleProject/integration_test/test_conference.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_test/flutter_test.dart';
3 | import 'package:integration_test/integration_test.dart';
4 | import 'test_helper.dart';
5 |
6 | void main() {
7 | // Initialize the integration test bindings.
8 | IntegrationTestWidgetsFlutterBinding.ensureInitialized();
9 |
10 | testWidgets('Runs the app, taps on the settings icon, enters the URL, and runs the Conference example', (WidgetTester tester) async {
11 | // Launch the app.
12 | await launchApp(tester);
13 |
14 | // Enter the server URL.
15 | await enterServerUrl(tester, 'wss://test.antmedia.io:5443/FlutterCICDtest/websocket');
16 |
17 | // Tap the 'Conference' button.
18 | await tester.tap(find.text('Conference'));
19 | await tester.pumpAndSettle(const Duration(seconds: 1));
20 |
21 | // Find the first text field and enter 'test'.
22 | await tester.enterText(find.byType(TextField).at(0), 'test');
23 | await tester.pumpAndSettle();
24 |
25 | // Find the second text field and enter 'room'.
26 | await tester.enterText(find.byType(TextField).at(1), 'room');
27 | await tester.pumpAndSettle();
28 |
29 | // Tap the 'Connect' button.
30 | await tester.tap(find.text('Connect'));
31 | await tester.pumpAndSettle(const Duration(seconds: 20));
32 | });
33 | }
34 |
--------------------------------------------------------------------------------
/example/SampleProject/integration_test/test_data_channel.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_test/flutter_test.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:shared_preferences/shared_preferences.dart';
4 | import 'package:example/main.dart';
5 | import 'package:integration_test/integration_test.dart';
6 |
7 | void main() {
8 | // Initialize the integration test bindings.
9 | IntegrationTestWidgetsFlutterBinding.ensureInitialized();
10 |
11 | testWidgets('Runs the app, taps on the settings icon, enters the URL, and runs the Data Channel example', (WidgetTester tester) async {
12 | // Mock initial values for shared preferences.
13 | SharedPreferences.setMockInitialValues({});
14 |
15 | // Launch the app.
16 | await tester.pumpWidget(const MaterialApp(
17 | home: Scaffold(
18 | body: MyApp(),
19 | )));
20 |
21 | // Ensure the app has built.
22 | await tester.pumpAndSettle();
23 |
24 | // Verify the settings icon is present.
25 | expect(find.byIcon(Icons.settings), findsOneWidget);
26 |
27 | // Tap the settings icon.
28 | await tester.tap(find.byIcon(Icons.settings));
29 | await tester.pumpAndSettle();
30 |
31 | // Check if the AlertDialog appears after tapping settings.
32 | expect(find.byType(AlertDialog), findsOneWidget);
33 |
34 | // Enter the server URL in the TextField inside the dialog.
35 | await tester.enterText(find.byType(TextField), 'wss://test.antmedia.io:5443/FlutterCICDtest/websocket');
36 | await tester.pumpAndSettle();
37 |
38 | // Ensure the "Set Server Ip" button is present and enabled.
39 | final setServerIpButton = find.widgetWithText(MaterialButton, 'Set Server Ip');
40 | expect(setServerIpButton, findsOneWidget);
41 |
42 | // Tap the "Set Server Ip" button.
43 | await tester.tap(setServerIpButton);
44 | await tester.pumpAndSettle();
45 |
46 | // Verify that a SnackBar appears after setting the server IP.
47 | expect(find.byType(SnackBar), findsOneWidget);
48 |
49 | // Tap the 'Conference' button.
50 | await tester.tap(find.text('Data Channel'));
51 | await tester.pumpAndSettle();
52 |
53 | // Enter Room ID and tap OK.
54 | await tester.enterText(find.byType(TextField), '24x7test');
55 | await tester.tap(find.text('OK'));
56 | await tester.pumpAndSettle(const Duration(seconds: 5));
57 | });
58 | }
59 |
--------------------------------------------------------------------------------
/example/SampleProject/integration_test/test_helper.dart:
--------------------------------------------------------------------------------
1 | // test_helper.dart
2 |
3 | import 'dart:io';
4 |
5 | import 'package:flutter/material.dart';
6 | import 'package:flutter_test/flutter_test.dart';
7 | import 'package:shared_preferences/shared_preferences.dart';
8 | import 'package:example/main.dart';
9 |
10 | // A helper method to launch the app.
11 | Future launchApp(WidgetTester tester) async {
12 |
13 | // Mock initial values for shared preferences.
14 | SharedPreferences.setMockInitialValues({});
15 |
16 | // Launch the app.
17 | await tester.pumpWidget(const MaterialApp(
18 | home: Scaffold(
19 | body: MyApp(),
20 | ),
21 | ));
22 | await tester.pumpAndSettle();
23 | }
24 |
25 | // A helper method to open settings and enter a server URL.
26 | Future enterServerUrl(WidgetTester tester, String url) async {
27 | // Verify the settings icon is present.
28 | expect(find.byIcon(Icons.settings), findsOneWidget);
29 |
30 | // Tap the settings icon.
31 | await tester.tap(find.byIcon(Icons.settings));
32 | await tester.pumpAndSettle();
33 |
34 | // Check if the AlertDialog appears after tapping settings.
35 | expect(find.byType(AlertDialog), findsOneWidget);
36 |
37 | // Enter the server URL in the TextField inside the dialog.
38 | await tester.enterText(find.byType(TextField), url);
39 | await tester.pumpAndSettle();
40 |
41 | // Tap the "Set Server Ip" button.
42 | final setServerIpButton = find.widgetWithText(MaterialButton, 'Set Server Ip');
43 | expect(setServerIpButton, findsOneWidget);
44 | await tester.tap(setServerIpButton);
45 | await tester.pumpAndSettle();
46 |
47 | // Verify that a SnackBar appears after setting the server IP.
48 | expect(find.byType(SnackBar), findsOneWidget);
49 | }
50 |
51 | // A helper method to enter a Room ID and tap OK.
52 | Future enterRoomId(WidgetTester tester, String roomId) async {
53 | await tester.enterText(find.byType(TextField), roomId);
54 | await tester.tap(find.text('OK'));
55 | await tester.pumpAndSettle();
56 | }
--------------------------------------------------------------------------------
/example/SampleProject/integration_test/test_p2p.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_test/flutter_test.dart';
2 | import 'package:integration_test/integration_test.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:shared_preferences/shared_preferences.dart';
5 | import 'package:example/main.dart';
6 |
7 | void main() {
8 | // Initialize the integration test bindings.
9 | IntegrationTestWidgetsFlutterBinding.ensureInitialized();
10 |
11 | testWidgets('Runs the app, taps on the settings icon, enters the URL, and runs the Peer to Peer example', (WidgetTester tester) async {
12 | // Mock initial values for shared preferences.
13 | SharedPreferences.setMockInitialValues({});
14 |
15 | // Launch the app.
16 | await tester.pumpWidget(const MaterialApp(
17 | home: Scaffold(
18 | body: MyApp(),
19 | )));
20 |
21 | // Ensure the app has built.
22 | await tester.pumpAndSettle();
23 |
24 | // Verify the settings icon is present.
25 | expect(find.byIcon(Icons.settings), findsOneWidget);
26 |
27 | // Tap the settings icon.
28 | await tester.tap(find.byIcon(Icons.settings));
29 | await tester.pumpAndSettle();
30 |
31 | // Check if the AlertDialog appears after tapping settings.
32 | expect(find.byType(AlertDialog), findsOneWidget);
33 |
34 | // Enter the server URL in the TextField inside the dialog.
35 | await tester.enterText(find.byType(TextField), 'wss://test.antmedia.io:5443/FlutterCICDtest/websocket');
36 | await tester.pumpAndSettle();
37 |
38 | // Ensure the "Set Server Ip" button is present and enabled.
39 | final setServerIpButton = find.widgetWithText(MaterialButton, 'Set Server Ip');
40 | expect(setServerIpButton, findsOneWidget);
41 |
42 | // Tap the "Set Server Ip" button.
43 | await tester.tap(setServerIpButton);
44 | await tester.pumpAndSettle();
45 |
46 | // Verify that a SnackBar appears after setting the server IP.
47 | expect(find.byType(SnackBar), findsOneWidget);
48 |
49 | // Tap the 'Conference' button.
50 | await tester.tap(find.text('Peer to Peer'));
51 | await tester.pumpAndSettle();
52 |
53 | // Enter Room ID and tap OK.
54 | await tester.enterText(find.byType(TextField), 'p2pTest');
55 | await tester.tap(find.text('OK'));
56 | await tester.pumpAndSettle(const Duration(seconds: 5));
57 | });
58 | }
59 |
--------------------------------------------------------------------------------
/example/SampleProject/integration_test/test_play.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_test/flutter_test.dart';
3 | import 'package:flutter_webrtc/flutter_webrtc.dart';
4 | import 'package:integration_test/integration_test.dart';
5 | import 'test_helper.dart';
6 |
7 | void main() {
8 | // Initialize the integration test bindings.
9 | IntegrationTestWidgetsFlutterBinding.ensureInitialized();
10 |
11 | testWidgets('Runs the app, taps on the settings icon, enters the URL, and runs the play example', (WidgetTester tester) async {
12 | // Launch the app.
13 | await launchApp(tester);
14 |
15 | await tester.pumpAndSettle();
16 |
17 | // Enter the server URL.
18 | await enterServerUrl(tester, 'wss://test.antmedia.io:5443/24x7test/websocket');
19 |
20 | await tester.pumpAndSettle();
21 |
22 | // Tap the 'Play' button.
23 | await tester.tap(find.text('Play'));
24 | await tester.pumpAndSettle();
25 |
26 | // Enter Room ID and tap OK.
27 | await enterRoomId(tester, '24x7test');
28 | await tester.pumpAndSettle();
29 |
30 | const maxWaitTime = Duration(seconds: 120);
31 | final stopwatch = Stopwatch()..start();
32 |
33 | while (true) {
34 | if (stopwatch.elapsed > maxWaitTime) {
35 | fail('play did not start');
36 | }
37 | final callEndIcon = find.byIcon(Icons.call_end);
38 |
39 | if(tester.any(callEndIcon)) {
40 | await tester.tap(callEndIcon);
41 | await tester.pumpAndSettle();
42 | print("test: play started");
43 | break;
44 | }
45 | await tester.pumpAndSettle(const Duration(seconds: 10));
46 | }
47 | });
48 | }
49 |
50 |
--------------------------------------------------------------------------------
/example/SampleProject/integration_test/test_publish.dart:
--------------------------------------------------------------------------------
1 |
2 | import 'dart:io';
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter_test/flutter_test.dart';
5 | import 'package:integration_test/integration_test.dart';
6 | import 'package:example/publish.dart';
7 | import 'test_helper.dart';
8 |
9 | void main() {
10 |
11 | // Initialize the integration test bindings.
12 | IntegrationTestWidgetsFlutterBinding.ensureInitialized();
13 |
14 | testWidgets('Runs the app, taps on the settings icon, enters the URL, and runs the Publish example', (WidgetTester tester) async {
15 | // Launch the app.
16 | await launchApp(tester);
17 |
18 | // Enter the server URL.
19 | await enterServerUrl(tester, 'wss://test.antmedia.io:5443/FlutterCICDtest/websocket');
20 |
21 | // Tap the 'Publish' button.
22 | await tester.tap(find.text('Publish'));
23 | await tester.pumpAndSettle(const Duration(seconds: 2));
24 |
25 |
26 | // Enter Room ID and tap OK.
27 | await enterRoomId(tester, 'publishTest');
28 |
29 | // Verify the AlertDialog to choose the publishing source appears.
30 | expect(find.byType(AlertDialog), findsOneWidget);
31 |
32 | // Tap the "Camera" button.
33 | await tester.tap(find.widgetWithText(MaterialButton, 'Camera'));
34 | await tester.pumpAndSettle(const Duration(seconds: 15));
35 |
36 | // Verify that the Publish screen is loaded.
37 | expect(find.byType(Publish), findsOneWidget);
38 |
39 | // Check if the call_end icon is present and tap it if it appears.
40 | final callEndIcon = find.byIcon(Icons.call_end);
41 | await tester.tap(callEndIcon);
42 | await tester.pumpAndSettle();
43 | });
44 | }
45 |
--------------------------------------------------------------------------------
/example/SampleProject/ios/.gitignore:
--------------------------------------------------------------------------------
1 | **/dgph
2 | *.mode1v3
3 | *.mode2v3
4 | *.moved-aside
5 | *.pbxuser
6 | *.perspectivev3
7 | **/*sync/
8 | .sconsign.dblite
9 | .tags*
10 | **/.vagrant/
11 | **/DerivedData/
12 | Icon?
13 | **/Pods/
14 | **/.symlinks/
15 | profile
16 | xcuserdata
17 | **/.generated/
18 | Flutter/App.framework
19 | Flutter/Flutter.framework
20 | Flutter/Flutter.podspec
21 | Flutter/Generated.xcconfig
22 | Flutter/ephemeral/
23 | Flutter/app.flx
24 | Flutter/app.zip
25 | Flutter/flutter_assets/
26 | Flutter/flutter_export_environment.sh
27 | ServiceDefinitions.json
28 | Runner/GeneratedPluginRegistrant.*
29 |
30 | # Exceptions to above rules.
31 | !default.mode1v3
32 | !default.mode2v3
33 | !default.pbxuser
34 | !default.perspectivev3
35 |
--------------------------------------------------------------------------------
/example/SampleProject/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
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 | 12.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example/SampleProject/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/example/SampleProject/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/example/SampleProject/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | platform :ios, '13.0'
3 |
4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6 |
7 | project 'Runner', {
8 | 'Debug' => :debug,
9 | 'Profile' => :release,
10 | 'Release' => :release,
11 | }
12 |
13 | def flutter_root
14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15 | unless File.exist?(generated_xcode_build_settings_path)
16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17 | end
18 |
19 | File.foreach(generated_xcode_build_settings_path) do |line|
20 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
21 | return matches[1].strip if matches
22 | end
23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24 | end
25 |
26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27 |
28 | flutter_ios_podfile_setup
29 |
30 | target 'Runner' do
31 | use_frameworks!
32 | use_modular_headers!
33 |
34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35 | target 'RunnerTests' do
36 | inherit! :search_paths
37 | end
38 | end
39 |
40 | post_install do |installer|
41 | installer.pods_project.targets.each do |target|
42 | flutter_additional_ios_build_settings(target)
43 | end
44 | end
45 |
--------------------------------------------------------------------------------
/example/SampleProject/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/SampleProject/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/SampleProject/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/SampleProject/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
43 |
49 |
50 |
51 |
52 |
53 |
63 |
65 |
71 |
72 |
73 |
74 |
80 |
82 |
88 |
89 |
90 |
91 |
93 |
94 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/example/SampleProject/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/SampleProject/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/SampleProject/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/SampleProject/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import Flutter
2 | import UIKit
3 |
4 | @main
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 |
--------------------------------------------------------------------------------
/example/SampleProject/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 |
--------------------------------------------------------------------------------
/example/SampleProject/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ant-media/WebRTC-Flutter-SDK/02e0967d87e19b9945f6d3f6a114b788c1490b49/example/SampleProject/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/example/SampleProject/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ant-media/WebRTC-Flutter-SDK/02e0967d87e19b9945f6d3f6a114b788c1490b49/example/SampleProject/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/example/SampleProject/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ant-media/WebRTC-Flutter-SDK/02e0967d87e19b9945f6d3f6a114b788c1490b49/example/SampleProject/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/example/SampleProject/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ant-media/WebRTC-Flutter-SDK/02e0967d87e19b9945f6d3f6a114b788c1490b49/example/SampleProject/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/example/SampleProject/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ant-media/WebRTC-Flutter-SDK/02e0967d87e19b9945f6d3f6a114b788c1490b49/example/SampleProject/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/example/SampleProject/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ant-media/WebRTC-Flutter-SDK/02e0967d87e19b9945f6d3f6a114b788c1490b49/example/SampleProject/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/example/SampleProject/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ant-media/WebRTC-Flutter-SDK/02e0967d87e19b9945f6d3f6a114b788c1490b49/example/SampleProject/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/example/SampleProject/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ant-media/WebRTC-Flutter-SDK/02e0967d87e19b9945f6d3f6a114b788c1490b49/example/SampleProject/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/example/SampleProject/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ant-media/WebRTC-Flutter-SDK/02e0967d87e19b9945f6d3f6a114b788c1490b49/example/SampleProject/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/example/SampleProject/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ant-media/WebRTC-Flutter-SDK/02e0967d87e19b9945f6d3f6a114b788c1490b49/example/SampleProject/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/example/SampleProject/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ant-media/WebRTC-Flutter-SDK/02e0967d87e19b9945f6d3f6a114b788c1490b49/example/SampleProject/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/example/SampleProject/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ant-media/WebRTC-Flutter-SDK/02e0967d87e19b9945f6d3f6a114b788c1490b49/example/SampleProject/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/example/SampleProject/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ant-media/WebRTC-Flutter-SDK/02e0967d87e19b9945f6d3f6a114b788c1490b49/example/SampleProject/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/example/SampleProject/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ant-media/WebRTC-Flutter-SDK/02e0967d87e19b9945f6d3f6a114b788c1490b49/example/SampleProject/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/example/SampleProject/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ant-media/WebRTC-Flutter-SDK/02e0967d87e19b9945f6d3f6a114b788c1490b49/example/SampleProject/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/example/SampleProject/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 |
--------------------------------------------------------------------------------
/example/SampleProject/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ant-media/WebRTC-Flutter-SDK/02e0967d87e19b9945f6d3f6a114b788c1490b49/example/SampleProject/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/example/SampleProject/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ant-media/WebRTC-Flutter-SDK/02e0967d87e19b9945f6d3f6a114b788c1490b49/example/SampleProject/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/example/SampleProject/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ant-media/WebRTC-Flutter-SDK/02e0967d87e19b9945f6d3f6a114b788c1490b49/example/SampleProject/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/example/SampleProject/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.
--------------------------------------------------------------------------------
/example/SampleProject/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 |
--------------------------------------------------------------------------------
/example/SampleProject/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 |
--------------------------------------------------------------------------------
/example/SampleProject/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | NSMicrophoneUsageDescription
6 | Need microphone access for uploading audio
7 | NSCameraUsageDescription
8 | Need camera access for uploading images
9 | NSBluetoothAlwaysUsageDescription
10 | Our app uses bluetooth to find, connect and transfer data between different devices
11 | CFBundleDevelopmentRegion
12 | $(DEVELOPMENT_LANGUAGE)
13 | CFBundleDisplayName
14 | Ant Media Flutter Example
15 | CFBundleExecutable
16 | $(EXECUTABLE_NAME)
17 | CFBundleIdentifier
18 | $(PRODUCT_BUNDLE_IDENTIFIER)
19 | CFBundleInfoDictionaryVersion
20 | 6.0
21 | CFBundleName
22 | ant_media_flutter_example
23 | CFBundlePackageType
24 | APPL
25 | CFBundleShortVersionString
26 | $(FLUTTER_BUILD_NAME)
27 | CFBundleSignature
28 | ????
29 | CFBundleVersion
30 | $(FLUTTER_BUILD_NUMBER)
31 | LSRequiresIPhoneOS
32 |
33 | UILaunchStoryboardName
34 | LaunchScreen
35 | UIMainStoryboardFile
36 | Main
37 | UISupportedInterfaceOrientations
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationLandscapeLeft
41 | UIInterfaceOrientationLandscapeRight
42 |
43 | UISupportedInterfaceOrientations~ipad
44 |
45 | UIInterfaceOrientationPortrait
46 | UIInterfaceOrientationPortraitUpsideDown
47 | UIInterfaceOrientationLandscapeLeft
48 | UIInterfaceOrientationLandscapeRight
49 |
50 | CADisableMinimumFrameDurationOnPhone
51 |
52 | UIApplicationSupportsIndirectInputEvents
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/example/SampleProject/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/example/SampleProject/ios/RunnerTests/RunnerTests.swift:
--------------------------------------------------------------------------------
1 | import Flutter
2 | import UIKit
3 | import XCTest
4 |
5 | class RunnerTests: XCTestCase {
6 |
7 | func testExample() {
8 | // If you add code to the Runner application, consider adding tests here.
9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/example/SampleProject/lib/conference.dart:
--------------------------------------------------------------------------------
1 | // ignore_for_file: must_be_immutable, implementation_imports
2 |
3 | import 'dart:convert';
4 | import 'dart:core';
5 |
6 | import 'package:ant_media_flutter/ant_media_flutter.dart';
7 | import 'package:ant_media_flutter/src/utils/conference_widget/playwidget.dart';
8 | import 'package:flutter/material.dart';
9 | import 'package:flutter_webrtc/flutter_webrtc.dart';
10 |
11 | class Conference extends StatefulWidget {
12 | static String tag = 'call';
13 |
14 | String ip;
15 | String id;
16 | List