zego_uikit_prebuilt_live_audio_room 1.0.2 copy "zego_uikit_prebuilt_live_audio_room: ^1.0.2" to clipboard
zego_uikit_prebuilt_live_audio_room: ^1.0.2 copied to clipboard

PrebuiltLiveAudioRoom is a Live Audio Room kit that provides a ready-made group voice chat that supports up to 8 hosts and co-hosts to connect with millions of users downstage.

Quick start #


Integrate the SDK #

Add ZegoUIKitPrebuiltLiveAudioRoom as dependencies #

Run the following code in your project root directory:

flutter pub get zego_uikit_prebuilt_live_audio_room

This will add a line like this to your project's pubspec.yaml file (and Flutter will automatic run an implicit flutter pub get):

dependencies:
  zego_uikit_prebuilt_live_audio_room: ^1.0.2 # Add this line

Import the SDK #

Now in your Dart code, import the prebuilt Video Call Kit SDK.

import 'package:zego_uikit_prebuilt_live_audio_room/zego_uikit_prebuilt_live_audio_room';

Integrate the live audio room #

You can get the AppID and AppSign from ZEGOCLOUD's Console.

Users who use the same liveID can in the same live audio room. (ZegoUIKitPrebuiltLiveAudioRoom supports 1 host Live for now)

you can customize UI by config properties

@override
Widget build(BuildContext context) {
   return SafeArea(
      child: ZegoUIKitPrebuiltLiveAudioRoom(
         appID: /*Your App ID*/,
         appSign: /*Your App Sign*/,
         userID: user_id, // userID should only contain numbers, English characters and  '_'
         userName: 'user_name',
         liveID: 'live_id',
         config: isHost
                 ? ZegoUIKitPrebuiltLiveAudioRoomConfig.host()
                 : ZegoUIKitPrebuiltLiveAudioRoomConfig.audience(),
      ),
   );
}

Now, you can start a live audio room, other people who enter the same 'live name' can watch your live audio room.

How to run #

1. Config your project #

Android

  1. If your project was created with a version of flutter that is not the latest stable, you may need to manually modify compileSdkVersion in your_project/android/app/build.gradle to 33

    compileSdkVersion

  2. Need to add app permissions, Open the file your_project/app/src/main/AndroidManifest.xml, add the following code:

    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    

iOS:

  1. Add app permissions.

a. open the your_project/ios/Podfile file, and add the following to the post_install do |installer| part:

    # Start of the permission_handler configuration
    target.build_configurations.each do |config|
      config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
        '$(inherited)',
        'PERMISSION_CAMERA=1',
        'PERMISSION_MICROPHONE=1',
      ]
    end
    # End of the permission_handler configuration

b. open the your_project/ios/Runner/Info.plist file, and add the following to the dict part:

    <key>NSCameraUsageDescription</key>
    <string>We require camera access to connect to a live</string>
    <key>NSMicrophoneUsageDescription</key>
    <string>We require microphone access to connect to a live</string>

Turn off some classes's confusion

To prevent the ZEGO SDK public class names from being obfuscated, please complete the following steps:

  1. Create proguard-rules.pro file under [your_project > android > app] with content as show below:
-keep class **.zego.** { *; }
  1. Add the following config code to the release part of the your_project/android/app/build.gradle file.
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

image

2. Build & Run #

Now you can simply click the "Run" or "Debug" button to build and run your App on your device. /Pics/ZegoUIKit/Flutter/run_flutter_project.jpg

Custom prebuilt UI

Resources #

11
likes
0
pub points
86%
popularity

Publisher

verified publisherzegocloud.com

PrebuiltLiveAudioRoom is a Live Audio Room kit that provides a ready-made group voice chat that supports up to 8 hosts and co-hosts to connect with millions of users downstage.

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, flutter_screenutil, flutter_styled_toast, http, zego_uikit, zego_uikit_signaling_plugin

More

Packages that depend on zego_uikit_prebuilt_live_audio_room