AgoraVideoViewer

View to contain all the video session objects, including camera feeds and buttons for settings

Constructors

Link copied to clipboard
fun AgoraVideoViewer(context: Context, connectionData: AgoraConnectionData, style: AgoraVideoViewer.Style = Style.FLOATING, agoraSettings: AgoraSettings = AgoraSettings(), delegate: AgoraVideoViewerDelegate? = null)

Creates an AgoraVideoViewer object, to be placed anywhere in your application.

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Style and organisation to be applied to all the videos in this view.

Functions

Link copied to clipboard
fun join(channel: String, fetchToken: Boolean, role: Int? = null, uid: Int? = null)
fun join(channel: String, token: String? = null, role: Int? = null, uid: Int? = null)

Join the Agora channel with optional token request

Link copied to clipboard

Leave channel stops all preview elements

Link copied to clipboard

Login to Agora RTM

Properties

Link copied to clipboard
var activeSpeaker: Int? = null

The most recently active speaker in the session. This will only ever be set to remote users, not the local user.

Link copied to clipboard
lateinit var agkit: RtcEngine

RtcEngine being used by this AgoraVideoViewer

Link copied to clipboard

Settings and customisations such as position of on-screen buttons, collection view of all channel members, as well as agora video configuration.

Link copied to clipboard
lateinit var agRtmChannel: RtmChannel
Link copied to clipboard
lateinit var agRtmClient: RtmClient

RTM client used by this AgoraVideoViewer

Link copied to clipboard
open val beautyOptions: BeautyOptions

Default beautification settings

Link copied to clipboard

Video views to be displayed in the floating collection view.

Link copied to clipboard

Delegate for the AgoraVideoViewer, used for some important callback methods.

Link copied to clipboard
var isInRtcChannel: Boolean? = false

A boolean to check whether the user has joined the RTC channel or not.

Link copied to clipboard

Active speaker override.

Link copied to clipboard
var rtcOverrideHandler: IRtcEngineEventHandler? = null
Link copied to clipboard

Style and organisation to be applied to all the videos in this AgoraVideoViewer.

Link copied to clipboard
val TAG: String
Link copied to clipboard
var userID: Int = 0

ID of the local user. Setting to zero will tell Agora to assign one for you once connected.

Link copied to clipboard

Gets and sets the role for the user. Either .audience or .broadcaster.

Extensions

Link copied to clipboard

Update the contents of the floating view

Link copied to clipboard

Update the contents of the main grid view

Link copied to clipboard

Shuffle around the videos depending on the style