Skip to main content

Host Controls

This documentation explains how to create and utilize a "More" menu for host control in your iOS app.

To create the More menu, use the following code:

private func createMoreMenu(participantListener: DyteParticipantUpdateEventListener, indexPath: IndexPath) -> Bool {
var menus = [MenuType]()
let participant = participantListener.participant
let hostPermission =

if hostPermission.canPinParticipant {
if !participant.isPinned {
} else {

if hostPermission.canMuteAudio && participant.audioEnabled {

if hostPermission.canMuteVideo && participant.videoEnabled {

if hostPermission.canKickParticipant && participant != self.viewModel.mobileClient.localUser {

if menus.isEmpty {
return false
menus.append(contentsOf: [.cancel])

let moreMenu = DyteMoreMenu(title:, features: menus, onSelect: { [weak self] menuType in
guard let self = self else { return }
switch menuType {
case .pin:
case .unPin:
try? participant.unpin()
case .muteAudio:
try? participant.disableAudio()
case .muteVideo:
try? participant.disableVideo()
case .kick:
try? participant.kick()
case .cancel:
print("Operation cancelled")
print("No action needed")
}) self.view)
return true

This code creates a "More" menu with various options based on the host's permissions and the participant's current state. The menu allows the host to perform actions like pinning/unpinning a participant, muting their audio or video, and kicking them from the session.