Skip to content

RtkVideoView

Last updated View as MarkdownAgent setup

Renders a participant's video stream. Supports self-preview, remote participant video, and screen share rendering.

Initializer parameters

Parameter Type Required Default Description
participant RtkMeetingParticipant - The participant whose video to render
showSelfPreview Bool false Whether to show the local camera preview
showScreenShare Bool false Whether to show the screen share stream instead of camera

Methods

Method Return Type Description
reattachRenderer() Void Reattaches the video renderer to the participant stream
prepareForReuse() Void Prepares the view for reuse in a collection or table view
clean() Void Releases the video renderer and cleans up resources

Usage Examples

Basic Usage

import RealtimeKitUI

let videoView = RtkVideoView(participant: participant)
view.addSubview(videoView)

Self-preview

import RealtimeKitUI

let previewView = RtkVideoView(
    participant: localParticipant,
    showSelfPreview: true
)
view.addSubview(previewView)

Screen share

import RealtimeKitUI

let screenShareView = RtkVideoView(
    participant: participant,
    showScreenShare: true
)
view.addSubview(screenShareView)

Was this helpful?