├── .gitignore ├── README.md ├── images ├── audience_3.gif └── host_3.gif ├── live_streaming ├── README.md ├── analysis_options.yaml ├── android │ ├── .gitignore │ ├── app │ │ ├── build.gradle │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── zegocloud │ │ │ │ │ └── uikit │ │ │ │ │ └── flutter │ │ │ │ │ └── live_streaming │ │ │ │ │ └── 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 │ ├── live_streaming_android.iml │ └── settings.gradle ├── 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 ├── lib │ ├── .gitignore │ ├── common.dart │ ├── constants.dart │ ├── home_page.dart │ ├── live_page.dart │ └── main.dart ├── live_streaming.iml └── pubspec.yaml ├── live_streaming_with_cohosting ├── README.md ├── android │ ├── .gitignore │ ├── app │ │ ├── build.gradle │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── zegocloud │ │ │ │ │ └── uikit │ │ │ │ │ └── flutter │ │ │ │ │ └── live_streaming │ │ │ │ │ └── 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 ├── assets │ └── avatars │ │ ├── 1746.json │ │ ├── 1746.svga │ │ ├── 4337 400-320.json │ │ └── 4338 400-320.json ├── 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 ├── lib │ ├── .gitignore │ ├── common.dart │ ├── constants.dart │ ├── home_page.dart │ ├── live_page.dart │ └── main.dart └── pubspec.yaml ├── live_streaming_with_minigame ├── .gitignore ├── README.md ├── analysis_options.yaml ├── android │ ├── .gitignore │ ├── app │ │ ├── build.gradle │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── zegocloud │ │ │ │ │ └── uikit │ │ │ │ │ └── flutter │ │ │ │ │ └── live_streaming │ │ │ │ │ └── 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 ├── assets │ ├── images │ │ └── background.png │ └── minigame │ │ ├── index.html │ │ └── index.js ├── doc │ ├── copy_minigame.png │ ├── minigame_1.gif │ └── minigame_2.gif ├── ios │ ├── .gitignore │ ├── Flutter │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ └── Release.xcconfig │ ├── 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 ├── lib │ ├── .gitignore │ ├── common.dart │ ├── constants.dart │ ├── game_page.dart │ ├── home_page.dart │ ├── live_audio_room_game.dart │ ├── live_audio_room_page.dart │ ├── live_streaming_page.dart │ ├── main.dart │ └── minigame │ │ ├── service │ │ ├── defines │ │ │ ├── game_defines.dart │ │ │ ├── game_detail.dart │ │ │ ├── game_info.dart │ │ │ ├── game_language.dart │ │ │ ├── game_params.dart │ │ │ ├── game_player.dart │ │ │ ├── game_robot.dart │ │ │ ├── game_state.dart │ │ │ ├── list_notifier.dart │ │ │ ├── load_game_config.dart │ │ │ └── start_game_config.dart │ │ ├── impl │ │ │ ├── mini_game_impl.dart │ │ │ └── zegocloud_token.dart │ │ ├── mini_game_api.dart │ │ └── mini_game_event.dart │ │ ├── ui │ │ ├── show_game_list_view.dart │ │ └── start_game_dialog.dart │ │ └── your_game_server.dart └── pubspec.yaml ├── live_streaming_with_pkbattles ├── .gitignore ├── README.md ├── android │ ├── .gitignore │ ├── app │ │ ├── build.gradle │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── zegocloud │ │ │ │ │ └── live_streaming_with_cohosting_and_pk │ │ │ │ │ └── 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 ├── 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 │ │ ├── GeneratedPluginRegistrant.h │ │ ├── GeneratedPluginRegistrant.m │ │ ├── Info.plist │ │ └── Runner-Bridging-Header.h ├── lib │ ├── .gitignore │ ├── common.dart │ ├── constants.dart │ ├── home_page.dart │ ├── live_page.dart │ ├── main.dart │ └── pk_widgets │ │ ├── config.dart │ │ ├── events.dart │ │ ├── surface.dart │ │ └── widgets │ │ ├── join_widget.dart │ │ ├── mute_button.dart │ │ ├── quit_button.dart │ │ ├── request_widget.dart │ │ ├── requesting_id.dart │ │ ├── requesting_list.dart │ │ └── stop_button.dart ├── pubspec.yaml └── web │ ├── favicon.png │ ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png │ ├── index.html │ └── manifest.json └── live_streaming_with_screen_sharing ├── .gitignore ├── README.md ├── android ├── .gitignore ├── app │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── zegocloud │ │ │ │ └── uikit │ │ │ │ └── flutter │ │ │ │ └── live_streaming │ │ │ │ └── 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 ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Podfile ├── Runner.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── 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 └── ZegoLiveStreamingScreenShare │ ├── Info.plist │ └── SampleHandler.swift ├── lib ├── .gitignore └── main.dart └── pubspec.yaml /.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 | **/ios/Flutter/.last_build_id 26 | **/.dart_tool/ 27 | **/.flutter-plugins 28 | **/.flutter-plugins-dependencies 29 | **/.packages 30 | **/.pub-cache/ 31 | **/.pub/ 32 | **/pubspec.lock 33 | **/build/ 34 | 35 | # Web related 36 | **/lib/generated_plugin_registrant.dart 37 | **/secret.dart 38 | **/.metadata 39 | 40 | # Symbolication related 41 | **/app.*.symbols 42 | 43 | # Obfuscation related 44 | **/app.*.map.json 45 | 46 | # Android Studio will place build artifacts here 47 | **/android/app/debug 48 | **/android/app/profile 49 | **/android/app/release 50 | 51 | # Xcode 52 | **/Podfile.lock 53 | 54 | # web 55 | # yarn v2 56 | **/web/.yarn/cache 57 | **/web/.yarn/unplugged 58 | **/web/.yarn/build-state.yml 59 | **/web/.yarn/install-state.gz 60 | **/web/.pnp.* 61 | **/web/yarn.lock 62 | **/web/yarn-error.log 63 | **/web/package-lock.json 64 | 65 | # Google Services (e.g. APIs or Firebase) 66 | **/google-services.json 67 | **/GoogleService-Info.plist 68 | 69 | # vscode 70 | **/.vscode 71 | **/todo.txt 72 | **/tips.txt 73 | **/tree.txt 74 | **/client.txt 75 | **/*.sh 76 | **/Podfile 77 | 78 | Podfile.lock 79 | pubspec_overrides.yaml 80 | melos*.iml 81 | -------------------------------------------------------------------------------- /images/audience_3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/images/audience_3.gif -------------------------------------------------------------------------------- /images/host_3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/images/host_3.gif -------------------------------------------------------------------------------- /live_streaming/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 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /live_streaming/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/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /live_streaming/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | -keep class **.zego.** { *; } 2 | -------------------------------------------------------------------------------- /live_streaming/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /live_streaming/android/app/src/main/kotlin/com/zegocloud/uikit/flutter/live_streaming/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.zegocloud.uikit.flutter.live_streaming 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /live_streaming/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /live_streaming/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /live_streaming/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /live_streaming/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /live_streaming/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /live_streaming/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /live_streaming/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /live_streaming/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /live_streaming/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /live_streaming/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /live_streaming/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.8.0' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.3.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 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 | -------------------------------------------------------------------------------- /live_streaming/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /live_streaming/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-7.4-all.zip 7 | -------------------------------------------------------------------------------- /live_streaming/android/live_streaming_android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /live_streaming/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /live_streaming/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 | -------------------------------------------------------------------------------- /live_streaming/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 | 11.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /live_streaming/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /live_streaming/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /live_streaming/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | platform :ios, '12.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 | end 36 | 37 | post_install do |installer| 38 | installer.pods_project.targets.each do |target| 39 | flutter_additional_ios_build_settings(target) 40 | 41 | # Start of the permission_handler configuration 42 | target.build_configurations.each do |config| 43 | config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [ 44 | '$(inherited)', 45 | 'PERMISSION_CAMERA=1', 46 | 'PERMISSION_MICROPHONE=1', 47 | ] 48 | end 49 | # End of the permission_handler configuration 50 | 51 | end 52 | end 53 | -------------------------------------------------------------------------------- /live_streaming/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /live_streaming/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /live_streaming/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /live_streaming/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /live_streaming/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /live_streaming/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /live_streaming/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 | -------------------------------------------------------------------------------- /live_streaming/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /live_streaming/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /live_streaming/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /live_streaming/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /live_streaming/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /live_streaming/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /live_streaming/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /live_streaming/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /live_streaming/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /live_streaming/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /live_streaming/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /live_streaming/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /live_streaming/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /live_streaming/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /live_streaming/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /live_streaming/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 | -------------------------------------------------------------------------------- /live_streaming/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /live_streaming/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /live_streaming/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /live_streaming/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. -------------------------------------------------------------------------------- /live_streaming/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 | -------------------------------------------------------------------------------- /live_streaming/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 | -------------------------------------------------------------------------------- /live_streaming/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSCameraUsageDescription 6 | We require camera access to connect to a live streaming 7 | NSMicrophoneUsageDescription 8 | We require microphone access to connect to a live streaming 9 | CFBundleDevelopmentRegion 10 | $(DEVELOPMENT_LANGUAGE) 11 | CFBundleDisplayName 12 | ZegoUIKitLiveStreaming 13 | CFBundleExecutable 14 | $(EXECUTABLE_NAME) 15 | CFBundleIdentifier 16 | $(PRODUCT_BUNDLE_IDENTIFIER) 17 | CFBundleInfoDictionaryVersion 18 | 6.0 19 | CFBundleName 20 | live_streaming 21 | CFBundlePackageType 22 | APPL 23 | CFBundleShortVersionString 24 | $(FLUTTER_BUILD_NAME) 25 | CFBundleSignature 26 | ???? 27 | CFBundleVersion 28 | $(FLUTTER_BUILD_NUMBER) 29 | LSRequiresIPhoneOS 30 | 31 | UILaunchStoryboardName 32 | LaunchScreen 33 | UIMainStoryboardFile 34 | Main 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationLandscapeLeft 39 | UIInterfaceOrientationLandscapeRight 40 | 41 | UISupportedInterfaceOrientations~ipad 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationPortraitUpsideDown 45 | UIInterfaceOrientationLandscapeLeft 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | UIViewControllerBasedStatusBarAppearance 49 | 50 | CADisableMinimumFrameDurationOnPhone 51 | 52 | UIApplicationSupportsIndirectInputEvents 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /live_streaming/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /live_streaming/lib/.gitignore: -------------------------------------------------------------------------------- 1 | secret.dart -------------------------------------------------------------------------------- /live_streaming/lib/common.dart: -------------------------------------------------------------------------------- 1 | // Flutter imports: 2 | import 'package:flutter/material.dart'; 3 | 4 | // Package imports: 5 | import 'package:cached_network_image/cached_network_image.dart'; 6 | import 'package:zego_uikit_prebuilt_live_streaming/zego_uikit_prebuilt_live_streaming.dart'; 7 | 8 | Widget customAvatarBuilder( 9 | BuildContext context, 10 | Size size, 11 | ZegoUIKitUser? user, 12 | Map extraInfo, 13 | ) { 14 | return CachedNetworkImage( 15 | imageUrl: 'https://robohash.org/${user?.id}.png', 16 | imageBuilder: (context, imageProvider) => Container( 17 | decoration: BoxDecoration( 18 | shape: BoxShape.circle, 19 | image: DecorationImage( 20 | image: imageProvider, 21 | fit: BoxFit.cover, 22 | ), 23 | ), 24 | ), 25 | progressIndicatorBuilder: (context, url, downloadProgress) => 26 | CircularProgressIndicator(value: downloadProgress.progress), 27 | errorWidget: (context, url, error) { 28 | return ZegoAvatar(user: user, avatarSize: size); 29 | }, 30 | ); 31 | } 32 | -------------------------------------------------------------------------------- /live_streaming/lib/constants.dart: -------------------------------------------------------------------------------- 1 | // Dart imports: 2 | import 'dart:math' as math; 3 | 4 | /// Note that the userID needs to be globally unique, 5 | final String localUserID = math.Random().nextInt(10000).toString(); 6 | -------------------------------------------------------------------------------- /live_streaming/lib/live_page.dart: -------------------------------------------------------------------------------- 1 | // Flutter imports: 2 | import 'package:flutter/material.dart'; 3 | import 'package:live_streaming/constants.dart'; 4 | 5 | // Package imports: 6 | import 'package:zego_uikit_prebuilt_live_streaming/zego_uikit_prebuilt_live_streaming.dart'; 7 | 8 | // Project imports: 9 | import 'common.dart'; 10 | 11 | class LivePage extends StatefulWidget { 12 | final String liveID; 13 | final bool isHost; 14 | 15 | const LivePage({ 16 | Key? key, 17 | required this.liveID, 18 | this.isHost = false, 19 | }) : super(key: key); 20 | 21 | @override 22 | State createState() => LivePageState(); 23 | } 24 | 25 | class LivePageState extends State { 26 | @override 27 | Widget build(BuildContext context) { 28 | return SafeArea( 29 | child: ZegoUIKitPrebuiltLiveStreaming( 30 | appID: yourAppID /*input your AppID*/, 31 | appSign: yourAppSign /*input your AppSign*/, 32 | userID: localUserID, 33 | userName: 'user_$localUserID', 34 | liveID: widget.liveID, 35 | config: (widget.isHost 36 | ? ZegoUIKitPrebuiltLiveStreamingConfig.host() 37 | : ZegoUIKitPrebuiltLiveStreamingConfig.audience()) 38 | ..avatarBuilder = customAvatarBuilder, 39 | ), 40 | ); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /live_streaming/lib/main.dart: -------------------------------------------------------------------------------- 1 | // Flutter imports: 2 | import 'package:flutter/material.dart'; 3 | import 'package:live_streaming/home_page.dart'; 4 | 5 | // Package imports: 6 | import 'package:zego_uikit/zego_uikit.dart'; 7 | import 'package:zego_uikit_prebuilt_live_streaming/zego_uikit_prebuilt_live_streaming.dart'; 8 | 9 | void main() { 10 | WidgetsFlutterBinding.ensureInitialized(); 11 | ZegoUIKit().initLog().then((value) { 12 | runApp(const MyApp()); 13 | }); 14 | } 15 | 16 | class MyApp extends StatelessWidget { 17 | const MyApp({Key? key}) : super(key: key); 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return MaterialApp( 22 | title: 'Flutter Demo', 23 | home: ZegoUIKitPrebuiltLiveStreamingMiniPopScope( 24 | child: HomePage(), 25 | ), 26 | ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /live_streaming/live_streaming.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /live_streaming/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: live_streaming 2 | description: A new Flutter project. 3 | 4 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 5 | 6 | version: 1.2.0+1 7 | 8 | environment: 9 | sdk: ">=2.16.2 <4.0.0" 10 | 11 | dependencies: 12 | flutter: 13 | sdk: flutter 14 | 15 | cupertino_icons: ^1.0.2 16 | flutter_screenutil: ">=5.5.3+2 <5.6.1" 17 | cached_network_image: ^3.3.0 18 | 19 | zego_uikit: ^2.28.0-beta.3 20 | zego_uikit_signaling_plugin: ^2.8.7 21 | zego_uikit_prebuilt_live_streaming: ^3.14.0-beta.2 22 | 23 | dev_dependencies: 24 | flutter_test: 25 | sdk: flutter 26 | 27 | flutter_lints: ^3.0.0 28 | dart_code_metrics: any 29 | 30 | flutter: 31 | uses-material-design: true 32 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/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/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | -keep class **.zego.** { *; } 2 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/android/app/src/main/kotlin/com/zegocloud/uikit/flutter/live_streaming/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.zegocloud.uikit.flutter.live_streaming.with_cohosting 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_cohosting/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /live_streaming_with_cohosting/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_cohosting/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /live_streaming_with_cohosting/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_cohosting/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /live_streaming_with_cohosting/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_cohosting/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /live_streaming_with_cohosting/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_cohosting/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /live_streaming_with_cohosting/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.8.0' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.3.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | ext { 22 | compileSdkVersion = 34 23 | targetSdkVersion = 34 24 | appCompatVersion = "1.7.0" 25 | } 26 | subprojects { afterEvaluate { android { compileSdkVersion 34 } } } 27 | 28 | rootProject.buildDir = '../build' 29 | subprojects { 30 | project.buildDir = "${rootProject.buildDir}/${project.name}" 31 | } 32 | subprojects { 33 | project.evaluationDependsOn(':app') 34 | } 35 | 36 | tasks.register("clean", Delete) { 37 | delete rootProject.buildDir 38 | } 39 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/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-7.5-all.zip 7 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/assets/avatars/1746.svga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_cohosting/assets/avatars/1746.svga -------------------------------------------------------------------------------- /live_streaming_with_cohosting/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 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/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 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/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 | end 36 | 37 | post_install do |installer| 38 | installer.pods_project.targets.each do |target| 39 | flutter_additional_ios_build_settings(target) 40 | 41 | # Start of the permission_handler configuration 42 | target.build_configurations.each do |config| 43 | config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [ 44 | '$(inherited)', 45 | 'PERMISSION_CAMERA=1', 46 | 'PERMISSION_MICROPHONE=1', 47 | ] 48 | config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0' 49 | end 50 | # End of the permission_handler configuration 51 | 52 | end 53 | end 54 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 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 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_cohosting/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /live_streaming_with_cohosting/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_cohosting/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /live_streaming_with_cohosting/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_cohosting/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /live_streaming_with_cohosting/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_cohosting/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /live_streaming_with_cohosting/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_cohosting/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /live_streaming_with_cohosting/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_cohosting/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /live_streaming_with_cohosting/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_cohosting/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /live_streaming_with_cohosting/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_cohosting/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /live_streaming_with_cohosting/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_cohosting/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /live_streaming_with_cohosting/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_cohosting/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /live_streaming_with_cohosting/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_cohosting/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /live_streaming_with_cohosting/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_cohosting/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /live_streaming_with_cohosting/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_cohosting/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /live_streaming_with_cohosting/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_cohosting/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /live_streaming_with_cohosting/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_cohosting/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /live_streaming_with_cohosting/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 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_cohosting/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /live_streaming_with_cohosting/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_cohosting/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /live_streaming_with_cohosting/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_cohosting/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /live_streaming_with_cohosting/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. -------------------------------------------------------------------------------- /live_streaming_with_cohosting/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 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/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 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CADisableMinimumFrameDurationOnPhone 6 | 7 | CFBundleDevelopmentRegion 8 | $(DEVELOPMENT_LANGUAGE) 9 | CFBundleDisplayName 10 | ZegoUIKitLiveStreamingWithCoHosting 11 | CFBundleExecutable 12 | $(EXECUTABLE_NAME) 13 | CFBundleIdentifier 14 | $(PRODUCT_BUNDLE_IDENTIFIER) 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | live_streaming 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | $(FLUTTER_BUILD_NAME) 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | $(FLUTTER_BUILD_NUMBER) 27 | LSRequiresIPhoneOS 28 | 29 | NSCameraUsageDescription 30 | We require camera access to connect to a live streaming 31 | NSMicrophoneUsageDescription 32 | We require microphone access to connect to a live streaming 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 | UIViewControllerBasedStatusBarAppearance 51 | 52 | UIApplicationSupportsIndirectInputEvents 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/lib/.gitignore: -------------------------------------------------------------------------------- 1 | secret.dart -------------------------------------------------------------------------------- /live_streaming_with_cohosting/lib/common.dart: -------------------------------------------------------------------------------- 1 | // Flutter imports: 2 | // Package imports: 3 | import 'package:cached_network_image/cached_network_image.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:zego_uikit_prebuilt_live_streaming/zego_uikit_prebuilt_live_streaming.dart'; 6 | 7 | Widget customAvatarBuilder( 8 | BuildContext context, 9 | Size size, 10 | ZegoUIKitUser? user, 11 | Map extraInfo, 12 | ) { 13 | return Stack(children: [ 14 | CachedNetworkImage( 15 | imageUrl: 'https://robohash.org/${user?.id}.png', 16 | imageBuilder: (context, imageProvider) => Container( 17 | decoration: BoxDecoration( 18 | shape: BoxShape.circle, 19 | image: DecorationImage( 20 | image: imageProvider, 21 | fit: BoxFit.cover, 22 | ), 23 | ), 24 | ), 25 | progressIndicatorBuilder: (context, url, downloadProgress) => 26 | CircularProgressIndicator(value: downloadProgress.progress), 27 | errorWidget: (context, url, error) { 28 | return ZegoAvatar(user: user, avatarSize: size); 29 | }, 30 | ), 31 | // Lottie.asset('assets/avatars/4338 400-320.json'), 32 | // const SVGASimpleImage(assetsName: 'assets/avatars/1746.svga'), 33 | ]); 34 | } 35 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/lib/constants.dart: -------------------------------------------------------------------------------- 1 | // Dart imports: 2 | import 'dart:math' as math; 3 | 4 | /// Note that the userID needs to be globally unique, 5 | final String localUserID = math.Random().nextInt(10000).toString(); 6 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/lib/main.dart: -------------------------------------------------------------------------------- 1 | // Dart imports: 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:live_streaming_cohost/home_page.dart'; 5 | 6 | // Package imports: 7 | import 'package:zego_uikit_prebuilt_live_streaming/zego_uikit_prebuilt_live_streaming.dart'; 8 | 9 | void main() { 10 | WidgetsFlutterBinding.ensureInitialized(); 11 | 12 | final navigatorKey = GlobalKey(); 13 | 14 | ZegoUIKit().initLog().then((value) { 15 | runApp(MyApp( 16 | navigatorKey: navigatorKey, 17 | )); 18 | }); 19 | } 20 | 21 | class MyApp extends StatefulWidget { 22 | final GlobalKey navigatorKey; 23 | 24 | const MyApp({ 25 | required this.navigatorKey, 26 | Key? key, 27 | }) : super(key: key); 28 | 29 | @override 30 | State createState() => MyAppState(); 31 | } 32 | 33 | class MyAppState extends State { 34 | @override 35 | Widget build(BuildContext context) { 36 | return MaterialApp( 37 | title: 'Flutter Demo', 38 | home: ZegoUIKitPrebuiltLiveStreamingMiniPopScope( 39 | child: HomePage(), 40 | ), 41 | navigatorKey: widget.navigatorKey, 42 | builder: (BuildContext context, Widget? child) { 43 | return Stack( 44 | children: [ 45 | child!, 46 | 47 | /// support minimizing 48 | ZegoUIKitPrebuiltLiveStreamingMiniOverlayPage( 49 | contextQuery: () { 50 | return widget.navigatorKey.currentState!.context; 51 | }, 52 | ), 53 | ], 54 | ); 55 | }, 56 | ); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /live_streaming_with_cohosting/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: live_streaming_cohost 2 | description: A new Flutter project. 3 | 4 | publish_to: "none" # Remove this line if you wish to publish to pub.dev 5 | 6 | version: 1.2.0+1 7 | 8 | environment: 9 | sdk: ">=2.16.2 <4.0.0" 10 | 11 | dependencies: 12 | flutter: 13 | sdk: flutter 14 | 15 | zego_uikit: ^2.28.0 16 | zego_uikit_prebuilt_live_streaming: ^3.13.8 17 | zego_uikit_signaling_plugin: ^2.8.7 18 | 19 | cupertino_icons: ^1.0.2 20 | flutter_screenutil: ">=5.5.3+2 <5.6.1" 21 | cached_network_image: ^3.3.0 22 | lottie: ^3.1.0 23 | 24 | dev_dependencies: 25 | flutter_test: 26 | sdk: flutter 27 | 28 | flutter_lints: ^3.0.0 29 | dart_code_metrics: any 30 | 31 | flutter: 32 | uses-material-design: true 33 | 34 | assets: 35 | - assets/avatars/ 36 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .packages 31 | .pub-cache/ 32 | .pub/ 33 | /build/ 34 | 35 | # Web related 36 | lib/generated_plugin_registrant.dart 37 | 38 | # Symbolication related 39 | app.*.symbols 40 | 41 | # Obfuscation related 42 | app.*.map.json 43 | 44 | # Android Studio will place build artifacts here 45 | /android/app/debug 46 | /android/app/profile 47 | /android/app/release 48 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/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/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | -keep class **.zego.** { *; } 2 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/android/app/src/main/kotlin/com/zegocloud/uikit/flutter/live_streaming/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.zegocloud.uikit.flutter.live_streaming.with_minigame 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_minigame/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /live_streaming_with_minigame/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_minigame/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /live_streaming_with_minigame/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_minigame/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /live_streaming_with_minigame/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_minigame/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /live_streaming_with_minigame/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_minigame/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /live_streaming_with_minigame/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.8.0' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.3.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 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 | tasks.register("clean", Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/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-7.4-all.zip 7 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/assets/images/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_minigame/assets/images/background.png -------------------------------------------------------------------------------- /live_streaming_with_minigame/doc/copy_minigame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_minigame/doc/copy_minigame.png -------------------------------------------------------------------------------- /live_streaming_with_minigame/doc/minigame_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_minigame/doc/minigame_1.gif -------------------------------------------------------------------------------- /live_streaming_with_minigame/doc/minigame_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_minigame/doc/minigame_2.gif -------------------------------------------------------------------------------- /live_streaming_with_minigame/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 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/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 | 11.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/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 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_minigame/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /live_streaming_with_minigame/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_minigame/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /live_streaming_with_minigame/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_minigame/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /live_streaming_with_minigame/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_minigame/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /live_streaming_with_minigame/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_minigame/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /live_streaming_with_minigame/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_minigame/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /live_streaming_with_minigame/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_minigame/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /live_streaming_with_minigame/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_minigame/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /live_streaming_with_minigame/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_minigame/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /live_streaming_with_minigame/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_minigame/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /live_streaming_with_minigame/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_minigame/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /live_streaming_with_minigame/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_minigame/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /live_streaming_with_minigame/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_minigame/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /live_streaming_with_minigame/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_minigame/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /live_streaming_with_minigame/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_minigame/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /live_streaming_with_minigame/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 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_minigame/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /live_streaming_with_minigame/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_minigame/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /live_streaming_with_minigame/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_minigame/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /live_streaming_with_minigame/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. -------------------------------------------------------------------------------- /live_streaming_with_minigame/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 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/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 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CADisableMinimumFrameDurationOnPhone 6 | 7 | CFBundleDevelopmentRegion 8 | $(DEVELOPMENT_LANGUAGE) 9 | CFBundleDisplayName 10 | ZegoUIKitLiveStreamingWithCoHosting 11 | CFBundleExecutable 12 | $(EXECUTABLE_NAME) 13 | CFBundleIdentifier 14 | $(PRODUCT_BUNDLE_IDENTIFIER) 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | live_streaming 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | $(FLUTTER_BUILD_NAME) 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | $(FLUTTER_BUILD_NUMBER) 27 | LSRequiresIPhoneOS 28 | 29 | NSCameraUsageDescription 30 | We require camera access to connect to a live streaming 31 | NSMicrophoneUsageDescription 32 | We require microphone access to connect to a live streaming 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 | UIViewControllerBasedStatusBarAppearance 51 | 52 | UIApplicationSupportsIndirectInputEvents 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/lib/.gitignore: -------------------------------------------------------------------------------- 1 | secret.dart -------------------------------------------------------------------------------- /live_streaming_with_minigame/lib/common.dart: -------------------------------------------------------------------------------- 1 | // Flutter imports: 2 | // Package imports: 3 | import 'package:cached_network_image/cached_network_image.dart'; 4 | import 'package:flutter/cupertino.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:zego_uikit_prebuilt_live_streaming/zego_uikit_prebuilt_live_streaming.dart'; 7 | 8 | import 'main.dart'; 9 | 10 | Widget customAvatarBuilder( 11 | BuildContext context, 12 | Size size, 13 | ZegoUIKitUser? user, 14 | Map extraInfo, 15 | ) { 16 | return CachedNetworkImage( 17 | imageUrl: 'https://robohash.org/${user?.id}.png', 18 | imageBuilder: (context, imageProvider) => Container( 19 | decoration: BoxDecoration( 20 | shape: BoxShape.circle, 21 | image: DecorationImage( 22 | image: imageProvider, 23 | fit: BoxFit.cover, 24 | ), 25 | ), 26 | ), 27 | progressIndicatorBuilder: (context, url, _) => const CupertinoActivityIndicator(), 28 | errorWidget: (context, url, error) { 29 | ZegoLoggerService.logInfo( 30 | '$user avatar url is invalid', 31 | tag: 'live audio', 32 | subTag: 'live page', 33 | ); 34 | return ZegoAvatar(user: user, avatarSize: size); 35 | }, 36 | ); 37 | } 38 | 39 | void showSnackBar(String text) { 40 | debugPrint('show snack bar: $text'); 41 | ScaffoldMessenger.of(navigatorKey.currentContext!).showSnackBar(SnackBar(content: Text(text))); 42 | } 43 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/lib/constants.dart: -------------------------------------------------------------------------------- 1 | // Dart imports: 2 | import 'dart:math' as math; 3 | 4 | const int yourAppID = ; 5 | const String yourAppSign = ; 6 | const String yourServerSecret = ; 7 | 8 | /// Note that the userID needs to be globally unique, 9 | final String localUserID = math.Random().nextInt(1000000).toString(); 10 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/lib/main.dart: -------------------------------------------------------------------------------- 1 | // Dart imports: 2 | 3 | import 'package:flutter/material.dart'; 4 | // Package imports: 5 | import 'package:zego_uikit_prebuilt_live_streaming/zego_uikit_prebuilt_live_streaming.dart'; 6 | 7 | import 'home_page.dart'; 8 | 9 | final navigatorKey = GlobalKey(); 10 | 11 | void main() { 12 | WidgetsFlutterBinding.ensureInitialized(); 13 | 14 | ZegoUIKit().initLog().then((value) { 15 | runApp(const MyApp()); 16 | }); 17 | } 18 | 19 | class MyApp extends StatefulWidget { 20 | const MyApp({ 21 | Key? key, 22 | }) : super(key: key); 23 | 24 | @override 25 | State createState() => MyAppState(); 26 | } 27 | 28 | class MyAppState extends State { 29 | @override 30 | Widget build(BuildContext context) { 31 | return MaterialApp( 32 | title: 'Flutter Demo', 33 | home: HomePage(), 34 | navigatorKey: navigatorKey, 35 | builder: (BuildContext context, Widget? child) { 36 | return Stack( 37 | children: [ 38 | child!, 39 | 40 | /// support minimizing 41 | ZegoUIKitPrebuiltLiveStreamingMiniOverlayPage( 42 | contextQuery: () { 43 | return navigatorKey.currentState!.context; 44 | }, 45 | ), 46 | ], 47 | ); 48 | }, 49 | ); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/lib/minigame/service/defines/game_defines.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'dart:math'; 3 | 4 | import 'package:flutter/foundation.dart'; 5 | 6 | export 'package:flutter_inappwebview/flutter_inappwebview.dart'; 7 | 8 | part 'game_detail.dart'; 9 | part 'game_info.dart'; 10 | part 'game_language.dart'; 11 | part 'game_params.dart'; 12 | part 'game_player.dart'; 13 | part 'game_robot.dart'; 14 | part 'game_state.dart'; 15 | part 'list_notifier.dart'; 16 | part 'load_game_config.dart'; 17 | part 'start_game_config.dart'; 18 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/lib/minigame/service/defines/game_detail.dart: -------------------------------------------------------------------------------- 1 | part of 'game_defines.dart'; 2 | 3 | class ZegoGameDetail { 4 | List? spin; 5 | List player = []; 6 | String? thumbnail; 7 | int? cloudType; 8 | String? miniGameId; 9 | String? mgName; 10 | String? mgUrl; 11 | int? gameOrientation; 12 | List? gameMode; 13 | int? designWidth; 14 | int? designHeight; 15 | int? safeHeight; 16 | 17 | ZegoGameDetail.fromJson(Map json) { 18 | spin = json['spin'] == null ? null : List.from(json['spin']); 19 | player = List.from(json['player']); 20 | thumbnail = json['thumbnail']; 21 | cloudType = json['CloudType']; 22 | miniGameId = json['miniGameId']; 23 | mgName = json['mgName']; 24 | mgUrl = json['mgUrl']; 25 | gameOrientation = json['gameOrientation']; 26 | gameMode = json['gameMode'] == null ? null : List.from(json['gameMode']); 27 | designWidth = json['designWidth']; 28 | designHeight = json['designHeight']; 29 | safeHeight = json['safeHeight']; 30 | } 31 | 32 | Map toJson() { 33 | final _data = {}; 34 | if (spin != null) { 35 | _data['spin'] = spin; 36 | } 37 | _data['player'] = player; 38 | _data['thumbnail'] = thumbnail; 39 | _data['CloudType'] = cloudType; 40 | _data['miniGameId'] = miniGameId; 41 | _data['mgName'] = mgName; 42 | _data['mgUrl'] = mgUrl; 43 | _data['gameOrientation'] = gameOrientation; 44 | if (gameMode != null) { 45 | _data['gameMode'] = gameMode; 46 | } 47 | _data['designWidth'] = designWidth; 48 | _data['designHeight'] = designHeight; 49 | _data['safeHeight'] = safeHeight; 50 | return _data; 51 | } 52 | 53 | @override 54 | String toString() => 55 | 'ZegoGameDetail(spin: $spin, player: $player, thumbnail: $thumbnail, CloudType: $cloudType, miniGameId: $miniGameId, mgName: $mgName, mgUrl: $mgUrl, gameOrientation: $gameOrientation, gameMode: $gameMode, designWidth: $designWidth, designHeight: $designHeight, safeHeight: $safeHeight)'; 56 | } 57 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/lib/minigame/service/defines/game_info.dart: -------------------------------------------------------------------------------- 1 | part of 'game_defines.dart'; 2 | 3 | class ZegoGameInfo { 4 | List? gameMode; 5 | int? gameOrientation; 6 | String? desc; 7 | String? miniGameId; 8 | String? mgName; 9 | String? thumbnail; 10 | ZegoGameDetail? detail; 11 | 12 | ZegoGameInfo.fromJson(Map json) { 13 | desc = json['desc']; 14 | thumbnail = json['thumbnail']; 15 | miniGameId = json['miniGameId']; 16 | mgName = json['mgName']; 17 | gameOrientation = json['gameOrientation']; 18 | gameMode = json['gameMode'] == null ? null : List.from(json['gameMode']); 19 | } 20 | 21 | Map toJson() { 22 | final _data = {}; 23 | _data['thumbnail'] = thumbnail; 24 | _data['desc'] = desc; 25 | _data['miniGameId'] = miniGameId; 26 | _data['mgName'] = mgName; 27 | _data['gameOrientation'] = gameOrientation; 28 | if (gameMode != null) { 29 | _data['gameMode'] = gameMode; 30 | } 31 | return _data; 32 | } 33 | 34 | @override 35 | String toString() => 36 | 'ZegoGameInfo(mgName: $mgName, miniGameId: $miniGameId, desc: $desc, thumbnail: $thumbnail, gameOrientation: $gameOrientation, gameMode: $gameMode, detail: $detail)'; 37 | } 38 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/lib/minigame/service/defines/game_params.dart: -------------------------------------------------------------------------------- 1 | part of 'game_defines.dart'; 2 | 3 | class StartGameParam { 4 | List robotList; 5 | List playerList; 6 | ZegoStartGameConfig gameConfig; 7 | 8 | StartGameParam({ 9 | required this.playerList, 10 | required this.gameConfig, 11 | this.robotList = const [], 12 | }); 13 | 14 | Map toMap() { 15 | final _data = {}; 16 | _data['robotList'] = robotList.map((e) => e.toMap()).toList(); 17 | _data['playerList'] = playerList.map((e) => e.toMap()).toList(); 18 | _data['gameConfig'] = gameConfig.toMap(); 19 | return _data; 20 | } 21 | 22 | String toJson() => json.encode(toMap()); 23 | 24 | @override 25 | String toString() => 'StartGameParam: robotList: $robotList, playerList: $playerList, gameConfig: $gameConfig'; 26 | } 27 | 28 | class LoadGameParam { 29 | String gameID; 30 | ZegoGameMode gameMode; 31 | ZegoLoadGameConfig? loadGameConfig; 32 | 33 | LoadGameParam({ 34 | required this.gameID, 35 | required this.gameMode, 36 | this.loadGameConfig, 37 | }); 38 | 39 | Map toMap() { 40 | final _data = {}; 41 | _data['gameID'] = gameID; 42 | _data['gameMode'] = gameMode.value; 43 | if (loadGameConfig != null) _data['config'] = loadGameConfig!.toMap(); 44 | return _data; 45 | } 46 | 47 | String toJson() => json.encode(toMap()); 48 | 49 | @override 50 | String toString() => 'LoadGameParam: gameID: $gameID, gameMode: $gameMode, loadGameConfig: $loadGameConfig'; 51 | } 52 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/lib/minigame/service/defines/game_player.dart: -------------------------------------------------------------------------------- 1 | part of 'game_defines.dart'; 2 | 3 | class ZegoPlayer { 4 | String userID; 5 | int seatIndex; 6 | 7 | ZegoPlayer({required this.userID, required this.seatIndex}); 8 | 9 | Map toMap() { 10 | final _data = {}; 11 | _data['userId'] = userID; 12 | _data['seatIndex'] = seatIndex; 13 | return _data; 14 | } 15 | 16 | String toJson() => json.encode(toMap()); 17 | } 18 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/lib/minigame/service/defines/game_robot.dart: -------------------------------------------------------------------------------- 1 | part of 'game_defines.dart'; 2 | 3 | class ZegoGameRobot { 4 | int robotLevel; 5 | int seatIndex; 6 | String robotName; 7 | String robotAvatar; 8 | int robotCoin; 9 | 10 | ZegoGameRobot({ 11 | this.robotLevel = 0, 12 | required this.seatIndex, 13 | required this.robotName, 14 | required this.robotAvatar, 15 | required this.robotCoin, 16 | }); 17 | 18 | Map toMap() { 19 | final _data = {}; 20 | _data['robotLevel'] = robotLevel; 21 | _data['seatIndex'] = seatIndex; 22 | _data['robotName'] = robotName; 23 | _data['robotAvatar'] = robotAvatar; 24 | _data['robotCoin'] = robotCoin; 25 | return _data; 26 | } 27 | 28 | String toJson() => json.encode(toMap()); 29 | 30 | @override 31 | String toString() => 32 | 'ZegoGameRobot: robotLevel: $robotLevel, seatIndex: $seatIndex, robotName: $robotName, robotAvatar: $robotAvatar, robotCoin: $robotCoin'; 33 | } 34 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/lib/minigame/service/defines/game_state.dart: -------------------------------------------------------------------------------- 1 | part of 'game_defines.dart'; 2 | 3 | enum ZegoGameState { 4 | idel(0), 5 | preparing(1), 6 | playing(2), 7 | stopping(3), 8 | over(4); 9 | 10 | const ZegoGameState(this.value); 11 | 12 | final int value; 13 | } 14 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/lib/minigame/service/defines/list_notifier.dart: -------------------------------------------------------------------------------- 1 | part of 'game_defines.dart'; 2 | 3 | class ListNotifier extends ValueNotifier> { 4 | ListNotifier(List value) : super(value); 5 | 6 | int get length => value.length; 7 | bool get isEmpty => value.isEmpty; 8 | bool get isNotEmpty => value.isNotEmpty; 9 | 10 | void add(T item, {bool notify = true}) { 11 | value.add(item); 12 | if (notify) notifyListeners(); 13 | } 14 | 15 | bool remove(Object? item, {bool notify = true}) { 16 | final changed = value.remove(item); 17 | if (changed && notify) notifyListeners(); 18 | return changed; 19 | } 20 | 21 | void addAll(Iterable iterable, {bool notify = true}) { 22 | value.addAll(iterable); 23 | if (notify) notifyListeners(); 24 | } 25 | 26 | void clear({bool notify = true}) { 27 | value.clear(); 28 | if (notify) notifyListeners(); 29 | } 30 | 31 | void insert(int index, T element, {bool notify = true}) { 32 | value.insert(index, element); 33 | if (notify) notifyListeners(); 34 | } 35 | 36 | void insertAll(int index, Iterable iterable, {bool notify = true}) { 37 | value.insertAll(index, iterable); 38 | if (notify) notifyListeners(); 39 | } 40 | 41 | void removeWhere(bool Function(T element) test, {bool notify = true}) { 42 | value.removeWhere(test); 43 | if (notify) notifyListeners(); 44 | } 45 | 46 | T operator [](int index) { 47 | return value[index]; 48 | } 49 | 50 | void operator []=(int index, T element) { 51 | if (value[index] != element) { 52 | value[index] = element; 53 | notifyListeners(); 54 | } 55 | } 56 | 57 | void sort(int Function(T a, T b) compare, {bool notify = true}) { 58 | value.sort(compare); 59 | if (notify) notifyListeners(); 60 | } 61 | 62 | void triggerNotify() => notifyListeners(); 63 | } 64 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/lib/minigame/service/defines/start_game_config.dart: -------------------------------------------------------------------------------- 1 | part of 'game_defines.dart'; 2 | 3 | enum ZegoTaxType { 4 | anteDeduction(1), // To impose a tax on all wagered game coins. 5 | winnerDeduction(2); // Only the winners are subject to taxation. 6 | 7 | const ZegoTaxType(this.value); 8 | 9 | final int value; 10 | } 11 | 12 | class ZegoStartGameConfig { 13 | // The default tax type is WinnerDeduction. 14 | final ZegoTaxType taxType; 15 | 16 | // The tax rate for this game is in the range of [0, 10000), The default value is 0. 17 | // corresponding to a value of one ten-thousandth of the tax rate. 18 | final int taxRate; 19 | 20 | // The minimum number of coins required to play the game. 21 | int minGameCoin; 22 | 23 | // After calling [startGame], the game server waits for the players to be ready 24 | // for a certain amount of time (in seconds). If the players are not fully ready 25 | // within this time, an error will be reported. The default time is 60 seconds. 26 | final int timeout; 27 | 28 | // Optional. Game configuration custom parameter Map. Use this Map to pass some custom parameters for the game. 29 | // If you need further information, please contact ZEGO technical support. 30 | final Map customConfig; 31 | 32 | ZegoStartGameConfig({ 33 | this.taxRate = 0, 34 | required this.minGameCoin, 35 | this.timeout = 60, 36 | this.taxType = ZegoTaxType.winnerDeduction, 37 | this.customConfig = const {}, 38 | }) { 39 | minGameCoin = max(minGameCoin, 0); 40 | } 41 | 42 | Map toMap() { 43 | final _data = {}; 44 | _data['taxType'] = taxType.value; 45 | _data['taxRate'] = taxRate.clamp(0, 9999); 46 | _data['minGameCoin'] = max(minGameCoin, 0); 47 | _data['timeout'] = timeout; 48 | _data['customConfig'] = customConfig; 49 | return _data; 50 | } 51 | 52 | String toJson() => json.encode(toMap()); 53 | 54 | @override 55 | String toString() { 56 | return 'ZegoStartGameConfig: taxType: ${taxType.name}, taxRate: $taxRate, minGameCoin: $minGameCoin, timeout: $timeout, customConfig: $customConfig'; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/lib/minigame/your_game_server.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:dio/dio.dart'; 4 | 5 | import 'service/impl/zegocloud_token.dart'; 6 | 7 | class YourGameServer { 8 | final miniGameHostUrl = ; 9 | final apiToken = 'api/token'; 10 | final apiGetUserCurrency = 'api/getUserCurrency'; 11 | final apiExchangeUserCurrency = 'api/exchangeUserCurrency'; 12 | final dio = Dio(BaseOptions(validateStatus: (status) => true)); 13 | 14 | Future getToken({required int appID, required String userID, String? serverSecret}) async { 15 | if (serverSecret?.isNotEmpty ?? false) { 16 | // ! ** Warning: ZegoTokenUtils is only for use during testing. When your application goes live, 17 | // ! ** tokens must be generated by the server side. Please do not generate tokens on the client side! 18 | return ZegoTokenUtils.generateToken(appID, serverSecret!, userID); 19 | } 20 | final response = await dio.post('$miniGameHostUrl/$apiToken', data: {'app_id': appID, 'user_id': userID}); 21 | return response.data.toString(); 22 | } 23 | 24 | Future getUserCurrency({required int appID, required String userID, required String gameID}) async { 25 | Response response; 26 | final dio = Dio(); 27 | response = await dio.post('$miniGameHostUrl/$apiGetUserCurrency', data: { 28 | 'UserId': userID, 29 | 'AppId': appID, 30 | 'MiniGameId': gameID, 31 | }); 32 | 33 | return json.decode(response.data.toString()); 34 | } 35 | 36 | Future exchangeUserCurrency( 37 | {required String outOrderId, 38 | required int appID, 39 | required String userID, 40 | required String gameID, 41 | required int exchangeValue}) async { 42 | final response = await dio.post('$miniGameHostUrl/$apiExchangeUserCurrency', data: { 43 | 'OutOrderId': DateTime.now().millisecondsSinceEpoch.toString(), 44 | 'UserId': userID, 45 | 'MiniGameId': gameID, 46 | 'AppId': appID, 47 | 'CurrencyDiff': exchangeValue, 48 | }); 49 | 50 | return json.decode(response.data.toString()); 51 | } 52 | 53 | factory YourGameServer() => instance; 54 | static final YourGameServer instance = YourGameServer._internal(); 55 | YourGameServer._internal(); 56 | } 57 | -------------------------------------------------------------------------------- /live_streaming_with_minigame/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: live_streaming_minigame 2 | description: A new Flutter project. 3 | 4 | publish_to: "none" # Remove this line if you wish to publish to pub.dev 5 | 6 | version: 1.2.0+1 7 | 8 | environment: 9 | sdk: ">=3.0.0 <4.0.0" 10 | 11 | dependencies: 12 | flutter: 13 | sdk: flutter 14 | 15 | zego_uikit: ^2.28.0-beta.3 16 | zego_uikit_prebuilt_live_streaming: ^3.14.0-beta.2 17 | zego_uikit_signaling_plugin: ^2.8.7 18 | 19 | cupertino_icons: ^1.0.2 20 | cached_network_image: ^3.3.0 21 | flutter_inappwebview: ^5.7.2+3 22 | dio: ^5.3.2 23 | encrypt: ^5.0.2 24 | zego_uikit_prebuilt_live_audio_room: ^3.16.0-beta.2 25 | faker: ^2.1.0 26 | 27 | dev_dependencies: 28 | flutter_test: 29 | sdk: flutter 30 | 31 | flutter_lints: ^3.0.0 32 | dart_code_metrics: any 33 | 34 | flutter: 35 | uses-material-design: true 36 | 37 | assets: 38 | - assets/images/ 39 | - assets/minigame/index.js 40 | - assets/minigame/index.html 41 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .packages 31 | .pub-cache/ 32 | .pub/ 33 | /build/ 34 | 35 | # Web related 36 | lib/generated_plugin_registrant.dart 37 | 38 | # Symbolication related 39 | app.*.symbols 40 | 41 | # Obfuscation related 42 | app.*.map.json 43 | 44 | # Android Studio will place build artifacts here 45 | /android/app/debug 46 | /android/app/profile 47 | /android/app/release 48 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/README.md: -------------------------------------------------------------------------------- 1 | # live_streaming_with_pkbattles 2 | 3 | 4 | 5 | ## Prerequisites 6 | 7 | Before you begin, make sure you complete the following: 8 | 9 | - Follow the integration steps by referring to the [Quick start with co-hosting\|_blank]([#14882](https://docs.zegocloud.com/article/15580)). 10 | 11 | - ⚠️⚠️⚠️ **Contact ZEGOCLOOUD Technical Support to enable the PK battle feature.** 12 | 13 | Document: [PK battles](https://docs.zegocloud.com/article/15580) 14 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/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/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | -keep class **.zego.** { *; } 2 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/android/app/src/main/kotlin/com/zegocloud/live_streaming_with_cohosting_and_pk/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.zegocloud.live_streaming_with_pkbattles 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_pkbattles/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_pkbattles/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_pkbattles/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_pkbattles/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_pkbattles/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.7.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.2.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 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 | tasks.register("clean", Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/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-7.5-all.zip 6 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/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 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/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 | 11.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | platform :ios, '12.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 | end 36 | 37 | post_install do |installer| 38 | installer.pods_project.targets.each do |target| 39 | flutter_additional_ios_build_settings(target) 40 | 41 | # Start of the permission_handler configuration 42 | target.build_configurations.each do |config| 43 | config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [ 44 | '$(inherited)', 45 | 'PERMISSION_CAMERA=1', 46 | 'PERMISSION_MICROPHONE=1', 47 | ] 48 | end 49 | # End of the permission_handler configuration 50 | 51 | end 52 | end 53 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/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 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/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 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_pkbattles/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/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. -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/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 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/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 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/ios/Runner/GeneratedPluginRegistrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GeneratedPluginRegistrant_h 8 | #define GeneratedPluginRegistrant_h 9 | 10 | #import 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface GeneratedPluginRegistrant : NSObject 15 | + (void)registerWithRegistry:(NSObject*)registry; 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | #endif /* GeneratedPluginRegistrant_h */ 20 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CADisableMinimumFrameDurationOnPhone 6 | 7 | CFBundleDevelopmentRegion 8 | $(DEVELOPMENT_LANGUAGE) 9 | CFBundleDisplayName 10 | Live Streaming With Cohosting And PK 11 | CFBundleExecutable 12 | $(EXECUTABLE_NAME) 13 | CFBundleIdentifier 14 | $(PRODUCT_BUNDLE_IDENTIFIER) 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | live_streaming_with_pkbattles 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | $(FLUTTER_BUILD_NAME) 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | $(FLUTTER_BUILD_NUMBER) 27 | LSRequiresIPhoneOS 28 | 29 | NSCameraUsageDescription 30 | We require camera access to connect to a live streaming 31 | NSMicrophoneUsageDescription 32 | We require microphone access to connect to a live streaming 33 | UIApplicationSupportsIndirectInputEvents 34 | 35 | UILaunchStoryboardName 36 | LaunchScreen 37 | UIMainStoryboardFile 38 | Main 39 | UISupportedInterfaceOrientations 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationLandscapeLeft 43 | UIInterfaceOrientationLandscapeRight 44 | 45 | UISupportedInterfaceOrientations~ipad 46 | 47 | UIInterfaceOrientationPortrait 48 | UIInterfaceOrientationPortraitUpsideDown 49 | UIInterfaceOrientationLandscapeLeft 50 | UIInterfaceOrientationLandscapeRight 51 | 52 | UIViewControllerBasedStatusBarAppearance 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/lib/.gitignore: -------------------------------------------------------------------------------- 1 | secret.dart -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/lib/common.dart: -------------------------------------------------------------------------------- 1 | // Flutter imports: 2 | import 'package:flutter/material.dart'; 3 | 4 | // Package imports: 5 | import 'package:cached_network_image/cached_network_image.dart'; 6 | import 'package:zego_uikit_prebuilt_live_streaming/zego_uikit_prebuilt_live_streaming.dart'; 7 | 8 | Widget customAvatarBuilder( 9 | BuildContext context, 10 | Size size, 11 | ZegoUIKitUser? user, 12 | Map extraInfo, 13 | ) { 14 | return CachedNetworkImage( 15 | imageUrl: 'https://robohash.org/${user?.id}.png', 16 | imageBuilder: (context, imageProvider) => Container( 17 | decoration: BoxDecoration( 18 | shape: BoxShape.circle, 19 | image: DecorationImage( 20 | image: imageProvider, 21 | fit: BoxFit.cover, 22 | ), 23 | ), 24 | ), 25 | progressIndicatorBuilder: (context, url, downloadProgress) => 26 | CircularProgressIndicator(value: downloadProgress.progress), 27 | errorWidget: (context, url, error) { 28 | return ZegoAvatar(user: user, avatarSize: size); 29 | }, 30 | ); 31 | } 32 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/lib/constants.dart: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:live_streaming_with_pkbattles/home_page.dart'; 3 | 4 | import 'package:zego_uikit/zego_uikit.dart'; 5 | import 'package:zego_uikit_prebuilt_live_streaming/zego_uikit_prebuilt_live_streaming.dart'; 6 | 7 | void main() { 8 | WidgetsFlutterBinding.ensureInitialized(); 9 | 10 | final navigatorKey = GlobalKey(); 11 | 12 | ZegoUIKit().initLog().then((value) { 13 | runApp(MyApp( 14 | navigatorKey: navigatorKey, 15 | )); 16 | }); 17 | } 18 | 19 | class MyApp extends StatefulWidget { 20 | final GlobalKey navigatorKey; 21 | 22 | const MyApp({ 23 | required this.navigatorKey, 24 | Key? key, 25 | }) : super(key: key); 26 | 27 | @override 28 | State createState() => MyAppState(); 29 | } 30 | 31 | class MyAppState extends State { 32 | @override 33 | Widget build(BuildContext context) { 34 | return MaterialApp( 35 | title: 'Flutter Demo', 36 | home: ZegoUIKitPrebuiltLiveStreamingMiniPopScope( 37 | child: HomePage(), 38 | ), 39 | navigatorKey: widget.navigatorKey, 40 | builder: (BuildContext context, Widget? child) { 41 | return Stack( 42 | children: [ 43 | child!, 44 | 45 | /// support minimizing 46 | ZegoUIKitPrebuiltLiveStreamingMiniOverlayPage( 47 | contextQuery: () { 48 | return widget.navigatorKey.currentState!.context; 49 | }, 50 | ), 51 | ], 52 | ); 53 | }, 54 | ); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/lib/pk_widgets/widgets/mute_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:zego_uikit_prebuilt_live_streaming/zego_uikit_prebuilt_live_streaming.dart'; 3 | 4 | class PKMuteButton extends StatefulWidget { 5 | final String userID; 6 | 7 | const PKMuteButton({ 8 | Key? key, 9 | required this.userID, 10 | }) : super(key: key); 11 | 12 | @override 13 | State createState() => _PKMuteButtonState(); 14 | } 15 | 16 | class _PKMuteButtonState extends State { 17 | @override 18 | Widget build(BuildContext context) { 19 | return ValueListenableBuilder>( 20 | valueListenable: 21 | ZegoUIKitPrebuiltLiveStreamingController().pk.mutedUsersNotifier, 22 | builder: (context, muteUsers, _) { 23 | return GestureDetector( 24 | onTap: () { 25 | ZegoUIKitPrebuiltLiveStreamingController().pk.muteAudios( 26 | targetHostIDs: [widget.userID], 27 | isMute: !muteUsers.contains(widget.userID), 28 | ); 29 | }, 30 | child: Container( 31 | decoration: BoxDecoration( 32 | color: Colors.purple.withOpacity(0.6), 33 | ), 34 | child: Icon( 35 | muteUsers.contains(widget.userID) 36 | ? Icons.volume_off 37 | : Icons.volume_up, 38 | color: Colors.black, 39 | // size: 25, 40 | ), 41 | ), 42 | ); 43 | }, 44 | ); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/lib/pk_widgets/widgets/quit_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | import 'package:zego_uikit_prebuilt_live_streaming/zego_uikit_prebuilt_live_streaming.dart'; 5 | 6 | class PKQuitButton extends StatefulWidget { 7 | final ValueNotifier>> 8 | requestingHostsMapRequestIDNotifier; 9 | final ValueNotifier liveStateNotifier; 10 | 11 | const PKQuitButton({ 12 | Key? key, 13 | required this.liveStateNotifier, 14 | required this.requestingHostsMapRequestIDNotifier, 15 | }) : super(key: key); 16 | 17 | @override 18 | State createState() => _PKQuitButtonState(); 19 | } 20 | 21 | class _PKQuitButtonState extends State { 22 | @override 23 | Widget build(BuildContext context) { 24 | return ValueListenableBuilder( 25 | valueListenable: widget.liveStateNotifier, 26 | builder: (context, state, _) { 27 | return SizedBox( 28 | height: 30, 29 | child: ElevatedButton( 30 | onPressed: ZegoLiveStreamingState.inPKBattle == state 31 | ? () => quitPKBattle(context) 32 | : null, 33 | child: const Text('Quit'), 34 | ), 35 | ); 36 | }, 37 | ); 38 | } 39 | 40 | void quitPKBattle(context) { 41 | if (!ZegoUIKitPrebuiltLiveStreamingController().pk.isInPK) { 42 | return; 43 | } 44 | 45 | ZegoUIKitPrebuiltLiveStreamingController().pk.quit().then((ret) { 46 | if (ret.error != null) { 47 | showDialog( 48 | context: context, 49 | builder: (context) { 50 | return CupertinoAlertDialog( 51 | title: const Text('quitPKBattle failed'), 52 | content: Text('Error: ${ret.error}'), 53 | actions: [ 54 | CupertinoDialogAction( 55 | onPressed: Navigator.of(context).pop, 56 | child: const Text('OK'), 57 | ), 58 | ], 59 | ); 60 | }, 61 | ); 62 | } else { 63 | widget.requestingHostsMapRequestIDNotifier.value = {}; 64 | } 65 | }); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/lib/pk_widgets/widgets/requesting_id.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class PKRequestingID extends StatefulWidget { 4 | final ValueNotifier requestIDNotifier; 5 | 6 | const PKRequestingID({ 7 | Key? key, 8 | required this.requestIDNotifier, 9 | }) : super(key: key); 10 | 11 | @override 12 | State createState() => _PKRequestingIDState(); 13 | } 14 | 15 | class _PKRequestingIDState extends State { 16 | @override 17 | Widget build(BuildContext context) { 18 | return ValueListenableBuilder( 19 | valueListenable: widget.requestIDNotifier, 20 | builder: (context, requestID, _) { 21 | if (requestID.isEmpty) { 22 | return Container(); 23 | } 24 | return Container( 25 | decoration: const BoxDecoration(color: Colors.black), 26 | child: Text( 27 | 'Request ID:$requestID', 28 | style: const TextStyle( 29 | color: Colors.white, 30 | ), 31 | ), 32 | ); 33 | }, 34 | ); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/lib/pk_widgets/widgets/stop_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | import 'package:zego_uikit_prebuilt_live_streaming/zego_uikit_prebuilt_live_streaming.dart'; 5 | 6 | class PKStopButton extends StatefulWidget { 7 | final ValueNotifier>> 8 | requestingHostsMapRequestIDNotifier; 9 | final ValueNotifier liveStateNotifier; 10 | 11 | const PKStopButton({ 12 | Key? key, 13 | required this.liveStateNotifier, 14 | required this.requestingHostsMapRequestIDNotifier, 15 | }) : super(key: key); 16 | 17 | @override 18 | State createState() => _PKStopButtonState(); 19 | } 20 | 21 | class _PKStopButtonState extends State { 22 | @override 23 | Widget build(BuildContext context) { 24 | return ValueListenableBuilder( 25 | valueListenable: widget.liveStateNotifier, 26 | builder: (context, state, _) { 27 | return SizedBox( 28 | height: 30, 29 | child: ElevatedButton( 30 | style: ElevatedButton.styleFrom( 31 | backgroundColor: Colors.red, // background (button) color 32 | foregroundColor: Colors.white, // foreground (text) color 33 | ), 34 | onPressed: ZegoLiveStreamingState.inPKBattle == state 35 | ? () => stopPKBattle(context) 36 | : null, 37 | child: const Text('Stop'), 38 | ), 39 | ); 40 | }, 41 | ); 42 | } 43 | 44 | void stopPKBattle(context) { 45 | if (!ZegoUIKitPrebuiltLiveStreamingController().pk.isInPK) { 46 | return; 47 | } 48 | 49 | ZegoUIKitPrebuiltLiveStreamingController().pk.stop().then((ret) { 50 | if (ret.error != null) { 51 | showDialog( 52 | context: context, 53 | builder: (context) { 54 | return CupertinoAlertDialog( 55 | title: const Text('stopPKBattle failed'), 56 | content: Text('Error: ${ret.error}'), 57 | actions: [ 58 | CupertinoDialogAction( 59 | onPressed: Navigator.of(context).pop, 60 | child: const Text('OK'), 61 | ), 62 | ], 63 | ); 64 | }, 65 | ); 66 | } else { 67 | widget.requestingHostsMapRequestIDNotifier.value = {}; 68 | } 69 | }); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: live_streaming_with_pkbattles 2 | description: A new Flutter project. 3 | 4 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 5 | 6 | version: 1.0.0+1 7 | 8 | environment: 9 | sdk: ">=2.16.2 <4.0.0" 10 | 11 | dependencies: 12 | flutter: 13 | sdk: flutter 14 | 15 | zego_uikit: ^2.28.0-beta.3 16 | zego_uikit_prebuilt_live_streaming: ^3.14.0-beta.2 17 | zego_uikit_signaling_plugin: ^2.8.7 18 | 19 | cupertino_icons: ^1.0.2 20 | radio_group_v2: ^2.1.3 21 | 22 | dev_dependencies: 23 | flutter_test: 24 | sdk: flutter 25 | 26 | flutter_lints: ^3.0.0 27 | dart_code_metrics: any 28 | 29 | flutter: 30 | uses-material-design: true 31 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_pkbattles/web/favicon.png -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_pkbattles/web/icons/Icon-192.png -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_pkbattles/web/icons/Icon-512.png -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_pkbattles/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_pkbattles/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | live_streaming_with_pkbattles 33 | 34 | 35 | 39 | 40 | 41 | 42 | 43 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /live_streaming_with_pkbattles/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "live_streaming_with_pkbattles", 3 | "short_name": "live_streaming_with_pkbattles", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .packages 31 | .pub-cache/ 32 | .pub/ 33 | /build/ 34 | 35 | # Web related 36 | lib/generated_plugin_registrant.dart 37 | 38 | # Symbolication related 39 | app.*.symbols 40 | 41 | # Obfuscation related 42 | app.*.map.json 43 | 44 | # Android Studio will place build artifacts here 45 | /android/app/debug 46 | /android/app/profile 47 | /android/app/release 48 | -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/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/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | -keep class **.zego.** { *; } 2 | -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/android/app/src/main/kotlin/com/zegocloud/uikit/flutter/live_streaming/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.zegocloud.uikit.flutter.live_streaming.with_cohosting 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_screen_sharing/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_screen_sharing/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_screen_sharing/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_screen_sharing/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_screen_sharing/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.8.0' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.3.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 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 | tasks.register("clean", Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/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-7.4-all.zip 7 | -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/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 | -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/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 | -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | platform :ios, '12.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 | end 36 | 37 | post_install do |installer| 38 | installer.pods_project.targets.each do |target| 39 | flutter_additional_ios_build_settings(target) 40 | 41 | # Start of the permission_handler configuration 42 | target.build_configurations.each do |config| 43 | config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [ 44 | '$(inherited)', 45 | 'PERMISSION_CAMERA=1', 46 | 'PERMISSION_MICROPHONE=1', 47 | ] 48 | end 49 | # End of the permission_handler configuration 50 | 51 | end 52 | end 53 | -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/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 | -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/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 | -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZEGOCLOUD/zego_uikit_prebuilt_live_streaming_example_flutter/1b5791db1ca9e790ddc4df429ed804dda1c95c4f/live_streaming_with_screen_sharing/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/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. -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/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 | -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CADisableMinimumFrameDurationOnPhone 6 | 7 | CFBundleDevelopmentRegion 8 | $(DEVELOPMENT_LANGUAGE) 9 | CFBundleDisplayName 10 | ZegoUIKitLiveStreamingWithCoHosting 11 | CFBundleExecutable 12 | $(EXECUTABLE_NAME) 13 | CFBundleIdentifier 14 | $(PRODUCT_BUNDLE_IDENTIFIER) 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | live_streaming 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | $(FLUTTER_BUILD_NAME) 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | $(FLUTTER_BUILD_NUMBER) 27 | LSRequiresIPhoneOS 28 | 29 | NSCameraUsageDescription 30 | We require camera access to connect to a live streaming 31 | NSMicrophoneUsageDescription 32 | We require microphone access to connect to a live streaming 33 | UIApplicationSupportsIndirectInputEvents 34 | 35 | UILaunchStoryboardName 36 | LaunchScreen 37 | UIMainStoryboardFile 38 | Main 39 | UISupportedInterfaceOrientations 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationLandscapeLeft 43 | UIInterfaceOrientationLandscapeRight 44 | 45 | UISupportedInterfaceOrientations~ipad 46 | 47 | UIInterfaceOrientationPortrait 48 | UIInterfaceOrientationPortraitUpsideDown 49 | UIInterfaceOrientationLandscapeLeft 50 | UIInterfaceOrientationLandscapeRight 51 | 52 | UIViewControllerBasedStatusBarAppearance 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/ios/ZegoLiveStreamingScreenShare/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSExtension 6 | 7 | NSExtensionPointIdentifier 8 | com.apple.broadcast-services-upload 9 | NSExtensionPrincipalClass 10 | $(PRODUCT_MODULE_NAME).SampleHandler 11 | RPBroadcastProcessMode 12 | RPBroadcastProcessModeSampleBuffer 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /live_streaming_with_screen_sharing/lib/.gitignore: -------------------------------------------------------------------------------- 1 | secret.dart --------------------------------------------------------------------------------