Giter VIP home page Giter VIP logo

chatroom's Introduction

Chatroom

Read this in other languages: 简体中文

Introduction

A typical voice chatroom has a host and several audience.

in which:

  • The host talks and the audience hear the host.
  • The host invites the audience for interaction and the audience switches the user role to be a co-host.
  • The host can mute or unmute the co-host, and delete or add a host position.
  • Any change to the host state and host position is immediately known to the host, co-host, and audience in the channel.

This use case particularly applies to scenarios such as online KTV and FM radio.

Agora supports real-time voice interaction between a maximum of one host + 16 co-hosts.

Feature

Use the Agora SDK to implement the following features in your project:

  • Real-time voice interaction: Smooth communication between the host and audience guaranteed by ultra-low latency.
  • Co-hosting: The audience becomes a co-host and interact with the host, so that all users in the channel can hear the interaction.
  • Host position control: The host has the following control privileges: invite an audience to become a co-host, switch a co-host back to an audience, mute and unmute a co-host, delete and resume a host position. Any change to the host state and host position is immediately known to all users in the channel.
  • Real-time messaging: The host, co-host, and audience can send IM messages to each other. The audience can also send gifts to the host/co-host.
  • User management: Maintains the user list and nicknames of the users in the channel.
  • Audio mixing: The host and co-host can play background music while talking.
  • Voice changer: Adds special voice effect for the host or co-host to add more fun to the chatroom.

The sample app shows only the part related to voice chat and is not a complete product. If you want to develop a complete product, you need to implement the rest of the voice chatroom.

Run the Sample App

  1. Create a developer account at agora.io and create a project in Dashboard to get an App ID.

  2. Download Voice SDK and Real-time Messaging SDK.

Android

  1. Add the AppID and Token in the Android/app/src/main/res/values/strings_config.xml file.

    <string name="app_id" translatable="false"><#Your App Id#></string>
    <string name="token" translatable="false"><#Temp Access Token#></string>
    <string name="rtm_token" translatable="false"><#Temp Rtm Access Token#></string>
    
  2. Unpack the SDKs and do the following:

    • Copy the libs folder to the Android/app folder.
  3. Open the project with Android Studio and connect to an Android test device. Compile and run the sample app.

     Development environment:
     - Android Studio 2.0+.
     - minSdkVersion 16.
     - Emulators may lack the functionality or performance needed to run the sample app. Agora recommends using physical Android devices. 
    

iOS

  1. Add the AppID and Token in the KeyCenter.swift file.

    static let AppId: String = <#Your App Id#>
    static let Token: String? = <#Temp Access Token#>
    static let RtmToken: String? = <#Temp Rtm Access Token#>
    
  2. Unpack the SDKs and copy the libs folder to the iOS/AgoraChatRoom folder of your project.

  3. Open the iOS/AgoraChatRoom.xcodeproj file with XCode. Connect to an iOS test device and fill in a valid developer signature.

     Development environment:
     - XCode 10.0+.
     - iOS 8.0+.
    

Key API list

iOS Android
RTC sharedEngineWithAppId:delegate: create
setChannelProfile setChannelProfile
setClientRole setClientRole
setAudioProfile setAudioProfile
joinChannel joinChannel
muteLocalAudioStream muteLocalAudioStream
RTM initWithAppId:delegate: createInstance
loginByToken:user:completion: login
createChannelWithId:delegate: createChannel
joinWithCompletion: join
getChannelAttributes:ByKeys:completion: getChannelAttributes
sendMessage:toPeer:completion: sendMessageToPeer
addOrUpdateLocalUserAttributes:completion: addOrUpdateChannelAttributes

FAQ

  1. Q: Noise reduction is disabled when there is only one host and scenario in audioProfile is set to Default, ShowRoom, Education, and GameStreaming. How can I fix that?

    A: You can enable noise reduction through the private interface: agoraKit.setParameters("{\"che.audio.enable.ns\":true}")

  2. Q: Calling the disableAudio or leaveChannel method stops other apps from using AVAudioSession to play and record. How can I fix that?

    A: You can keep the audio session active by calling the agoraKit.setAudioSessionOperationRestriction(.deactivateSession)method after calling the disableAudio or leaveChannel method.

Contact Us

  • API documentation is available at the Document Center.
  • For any issue with integration, connect with global developers in the Developer Community.
  • For genera technical support, submit a ticket at the Agora Dashboard.
  • For any issue with the sample code, submit an issue at GitHub.

License

The MIT License (MIT).

chatroom's People

Contributors

brianxcli avatar cavansu avatar guohai avatar lichking-2234 avatar plutoless avatar prwrl avatar tongjiangyong avatar yeyuzhou avatar yuanzaiyu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chatroom's Issues

no download

2.下载 Agora 语音通话/音频互动直播 SDK 和 实时消息 SDK。
是兩個都下載嗎?

音頻 實時 是哪個sdk 放在 libs libs 放入
image

都放入後 跑出這個
image

SDK

image

错误: <匿名io.agora.chatroom.manager.RtmManager$9>不是抽象的, 并且未覆盖RtmClientListener中的抽象方法onMediaDownloadingProgress(RtmMediaOperationProgress,long)
您好在安卓上运行出现了这个问题是因为SDK的版本太高吗

看不到观众

A,B设备进入同一个房间却看不到,点击上麦提示rtm not login,其实看日志已经登录成功了
image
image

Android - Compilation Error

I have downloaded the repositiories and tried compiling with the necessary SDK (jar files) in place. However, I get the following error. Please help. Thanks
Capture

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.