Skip to content
AnswerWell geo Documentation

Research · 6 min read · Answerwell

Meeting UI Kit Custom Controlbar, Header, and Shell

How to replace or compose RealtimeKit meeting controlbars and headers on iOS, Android, Angular, and React Native.

This page summarises Cloudflare RealtimeKit UI Kit documentation for building your own meeting chrome: the bottom controlbar (mic, camera, leave, custom actions) and the top header (title, elapsed time, recording state, participant count). You can ship the full pre-built meeting screen, swap in composed pieces, or keep the default shell and override only what you need.

Pre-built meeting UI vs custom controlbar and header

Section titled “Pre-built meeting UI vs custom controlbar and header”

RealtimeKit UI Kit offers turnkey shells and atomic widgets. On iOS, RealtimeKitUI can present a full meeting after you supply an authToken from the Add participant API:

Create a RealtimeKitUI instance with your auth token, then call startMeeting(completion:) to get a view controller. Present it to display the full meeting UI.

— Cloudflare, Build using UI Kit

When you need branding, extra actions (for example “Raise hand” or “Report bug”), or a non-standard layout, you stop using the monolithic bar and compose header and controlbar from kit components—or plug custom regions into MeetingViewController via its data source.

Approach Best when Default components (examples)
Full RealtimeKitUI.startMeeting Fastest path, standard group call UX Entire UI inside returned view controller
Pre-built bar/header views Same features as default, minimal layout work RtkMeetingControlBarView, RtkMeetingHeaderView (Android); RtkMeetingControlBar, RtkMeetingHeaderView (iOS)
Composed custom controlbar/header Custom grouping, extra buttons, app-specific actions Individual toggles and labels; see Add Custom Controlbar and Add Custom Header
MeetingViewController data source (iOS) Keep meeting shell, replace top/middle/bottom MeetingViewControllerDataSource

Livestream and webinar modes use dedicated bars and headers (RtkLivestreamControlBarView, RtkWebinarControlBarView, RtkLivestreamHeaderView); the same composition ideas apply, with stage/livestream-specific controls.

Custom controlbar: how to add buttons and change layout

Section titled “Custom controlbar: how to add buttons and change layout”

A custom controlbar keeps RealtimeKit wiring for mic, camera, and leave, while you control where controls sit and which extra actions appear.

iOS: RtkTabBar vs RtkMeetingControlBar data source

Section titled “iOS: RtkTabBar vs RtkMeetingControlBar data source”

The iOS UI Kit uses RtkMeetingControlBar as the default group-call bar. For a fully custom row of controls, build a RtkTabBar and add button components such as RtkAudioButtonControlBar, RtkVideoButtonControlBar, RtkSwitchCameraButtonControlBar, and RtkEndMeetingControlBarButton, then pin the bar to the safe area bottom.

If you only need to swap mic/video implementations but keep the default bar chrome, implement RtkMeetingControlBarDataSource: return a custom button or nil to accept the default for each slot.

Custom actions use RtkControlBarButton (image, title, target/action) and tabBar.setButtons([...]).

On Android, RtkMeetingControlBarView is the default. For a custom bar, place toggles inside RtkControlBarView in XML—RtkMicToggleButton, RtkCameraToggleButton, RtkMoreToggleButton, RtkLeaveButton—as in Add Custom Controlbar.

Call activate(meeting) on each button after the meeting room is joined. Buttons will not function until they are activated with a valid RealtimeKitClient instance.

— Cloudflare, Add Custom Controlbar

Custom bar buttons use RtkControlBarButton in XML (app:rtk_cbb_icon, app:rtk_cbb_variant, app:rtk_cbb_showText) and a click listener in Kotlin.

The Angular UI Kit documents an “enhanced controlbar” pattern: group rtk-mic-toggle, rtk-camera-toggle, rtk-leave-button, and related selectors in left/center/right flex regions, plus ordinary HTML buttons for app logic. Fullscreen toggle may need targetElement set on rtk-ui-provider after view init—see Add Custom Controlbar.

This approach gives you complete control over the controlbar layout while maintaining Angular’s component architecture and leveraging RealtimeKit’s built-in functionality.

— Cloudflare, Add Custom Controlbar

React Native: replace RtkControlbar with toggles

Section titled “React Native: replace RtkControlbar with toggles”

React Native exposes individual toggles from @cloudflare/realtimekit-react-native-ui. Replace RtkControlbar with a row of RtkMicToggle, RtkCameraToggle, RtkScreenShareToggle, RtkMoreToggle, and RtkLeaveButton, passing the meeting object into each toggle.

Wrap your component tree in RtkUIProvider. All UI Kit components read design tokens and state from RtkUIContext.

— Cloudflare, Add Custom Controlbar

Styled custom actions use RtkControlbarButton with label, icon, and onClick. Optional add-ons for bar buttons are listed under UI Kit Addons (“Custom Control Bar Button”).

Custom header: meeting title, clock, recording, and participant count

Section titled “Custom header: meeting title, clock, recording, and participant count”

Headers surface read-only meeting state and optional app actions (support links, bug report).

Section titled “iOS: stack RtkMeetingTitleLabel and related views”

RtkMeetingHeaderView is the default; it shows title, participant count, elapsed time, recording, and camera switch. For a custom header, compose RtkMeetingTitleLabel, RtkParticipantCountView, RtkClockView, and RtkRecordingView in stack views, as in Add Custom Header. RtkClockView shows elapsed time in HH:MM:SS and updates every second while the meeting is active.

Android: layout/custom_header.xml with kit views

Section titled “Android: layout/custom_header.xml with kit views”

Replace RtkMeetingHeaderView with a horizontal layout using RtkRecordingIndicator, RtkLivestreamIndicator, RtkMeetingTitleView, RtkGridPaginatorView, RtkParticipantCountView, and RtkClockView—see Add Custom Header. Inflate the layout from a small LinearLayout subclass for one-off buttons (for example “Report Bug”).

Recording and livestream indicators render nothing when inactive—RtkRecordingIndicator “does not render anything if no recording is taking place,” matching Angular/React rtk-recording-indicator behaviour.

Web Angular / React: rtk-header composition

Section titled “Web Angular / React: rtk-header composition”

rtk-header “houses all the header components.” Finer pieces include rtk-meeting-title, rtk-participant-count, and rtk-clock (“Shows the time elapsed in a meeting”). React Native RtkHeader renders logo, title, participant count, clock, and other header elements via the declarative UI config system.

iOS MeetingViewController: swap top bar, middle, and controlbar

Section titled “iOS MeetingViewController: swap top bar, middle, and controlbar”

When you already use MeetingViewController instead of raw layout code, assign a MeetingViewControllerDataSource that returns optional views for getTopbar, getMiddleView, and getBottomTabbar. Return your custom header, nil for default middle content, or a custom RtkMeetingControlBar instance—or nil to keep defaults where the API allows.

Initialize the client, then present:

let meetingVC = MeetingViewController(
meeting: rtkClient,
completion: {
self.dismiss(animated: true)
}
)
meetingVC.dataSource = CustomDataSource()
self.present(meetingVC, animated: true)

(See MeetingViewController — With custom data source.)

For consistent typography and colours across title and clock, iOS exposes AppTheme: read AppTheme.shared defaults or implement AppThemeProtocol, then AppTheme.shared.setUp(theme:). Individual views such as RtkClockView and RtkMeetingTitleLabel also accept RtkTextAppearance for per-control overrides.

Common mistakes when customising controlbar and header

Section titled “Common mistakes when customising controlbar and header”
  • Activating controls before join (Android): Calling activate(meeting) before the room is joined leaves bar buttons inert; activate after join with a valid RealtimeKitClient.
  • Skipping RtkUIProvider (React Native): Toggles and RtkControlbarButton expect design tokens and context from RtkUIProvider.
  • Expecting recording UI when idle: Recording components intentionally hide; empty space is normal when no recording is active.
  • Replacing the whole bar for one extra button: On iOS, prefer RtkMeetingControlBarDataSource or a single RtkControlBarButton on a RtkTabBar before reimplementing leave/end-call flows (RtkEndMeetingControlBarButton handles alerts unless you set shouldShowAlertOnClick = false).
  • Wrong shell for meeting type: Group call, livestream, and webinar pre-built bars differ; stage/livestream toggles live on RtkLivestreamControlBarView and RtkWebinarControlBarView, not the standard meeting bar.
  1. Join a test meeting with your integration using a valid participant authToken from the Add participant API, following Build using UI Kit.
  2. Confirm default or custom controlbar actions: mic and camera toggles respond, leave/end behaves as configured (RtkEndMeetingControlBarButton on iOS; RtkLeaveButton on Android).
  3. Verify header widgets: title matches metadata, RtkClockView / rtk-clock advances during the call, participant count updates on join/leave, and recording indicator appears only while recording is active.
  4. On Android, set a breakpoint or log after join and ensure each custom control calls activate(meeting) as described in Add Custom Controlbar.
  5. You can check automatically in Answerwell (our tool): https://answerwell.org/workspace

If something on this page does not match the RealtimeKit docs or your SDK behaviour, email yimasynthetic@gmail.com with the page URL and the exact statement you think is wrong so it can be corrected or clarified.