VideoCard

VideoCard - A UI component for displaying video streams with participant information and controls.

This component provides a comprehensive video display with:

  • Video stream rendering

  • Participant name and status

  • Audio waveform visualization

  • Control buttons (mute/unmute, video on/off)

  • Customizable styling and positioning

Constructors

Link copied to clipboard
constructor(options: VideoCardOptions)

Properties

Link copied to clipboard
val audioLevel: StateFlow<Float>
Link copied to clipboard
open override val currentStyle: ComponentStyle

Get the current style of this component.

Link copied to clipboard
open override val hasMedia: StateFlow<Boolean>

Whether media is currently being displayed.

Link copied to clipboard
open override val id: String

Unique identifier for this UI component.

Link copied to clipboard
open override val isAnimating: StateFlow<Boolean>

Whether an animation is currently running.

Link copied to clipboard
open override val isEnabled: Boolean

Whether this component is currently enabled.

Link copied to clipboard
open override val isVisible: Boolean

Whether this component is currently visible.

Link copied to clipboard
val showWaveform: StateFlow<Boolean>

Functions

Link copied to clipboard
open override fun applyStyle(style: ComponentStyle)

Apply a style to this component.

Link copied to clipboard
open override fun clearMedia()

Clear the media content.

Link copied to clipboard
open override fun disable()

Disable this component.

Link copied to clipboard
open override fun dispose()

Dispose of this component and release resources.

Link copied to clipboard
open override fun enable()

Enable this component.

Link copied to clipboard

Get the current participant information.

Link copied to clipboard
open override fun handleInteraction(event: InteractionEvent)

Handle a user interaction event.

Link copied to clipboard
open override fun hide()

Hide this component.

Link copied to clipboard
open override fun show()

Show this component.

Link copied to clipboard
open override fun startAnimation(animation: Animation)

Start an animation.

Link copied to clipboard
open override fun stopAnimation()

Stop the current animation.

Link copied to clipboard
suspend fun toggleAudio()

Toggle the audio mute state.

Link copied to clipboard
suspend fun toggleVideo()

Toggle the video state.

Link copied to clipboard

Update the audio level for waveform visualization.

Link copied to clipboard
open override fun updateMedia(mediaStream: MediaStream)

Update the media content being displayed.

Link copied to clipboard
fun updateParticipant(participant: Participant)

Update participant information.