introduce

Audio and video related content for many developers, usually contact relatively little. Although there are many manufacturers of audio and video services on the market, most OF the SDK is relatively mature, and the API is almost the same, but it always takes a lot of time to understand and debug the integration. So, there are only a few lines of code that can do this, regardless of the rest of the SDK configuration solution. The answer is yes

Today we bring you component packaging for call, point-to-point/multi-person audio and video scenarios. This component has the following features

  • After lib integration, only 3 lines of code can be used to make audio and video calls
  • There is no need to worry about any permission processing
  • You don’t have to write interface code
  • Core wrapper classes are few and easy to understand
  • Fully open source, you can modify the extension

This component is based on the following SDK for audio and video services


use

ARUILogin.init(this."eexxxxxxxxxx")
ARUILogin.login(this,ARCallUser("userId"))
ARUICallingImpl.getInstance(this).call(ARCallUser("userId"),ARUICalling.Type.VIDEO)
Copy the code

Over, just three lines of code to implement audio and video calls. The events such as the exception, start, and end of a call are called back by the interface

List of functions within a component

  • Audio call
  • Video call
  • Multi-voice calling
  • Multi-person video call
  • Video to voice call
  • Local notifications
  • Talk time
  • Size video switch
  • .

The interface display

P2P Call Display

Group Call Display

API specification

Login class (ARUILogin)

  1. Initialize components
fun init(context: Context,appId:String)
Copy the code
  1. Uninitialize the component
fun unInit()
Copy the code
  1. The login
fun login(arCallUser: ARCallUser, callback: ResultCallback<Void>)
Copy the code
  1. Log out
fun logout()
Copy the code

Audio and Video Calling (ARUICallingImpl)

  1. call
Fun call (user: ARCallUser, type: type) / / call personal fun call (the users: Array < ARCallUser >, type: type) / / call groupCopy the code
  1. Set the callback
fun setCallingListener(listener: ARUICallingListener)
Copy the code
  1. Setting a Ringtone Path
fun setCallingBell(filePath: String)
Copy the code
  1. Mute Mode
fun enableMuteMode(enable: Boolean)
Copy the code
  1. Set a custom View route
fun enableCustomViewRoute(enable: Boolean)
Copy the code

Project source code, experience address

🚀 GO