LogoLogo
ALO.ai
Developer Documentation
Developer Documentation
  • Developer Documentation
  • Developer Account
    • API Key
  • SDKs
    • Authentication
    • Chat
      • Configuration
      • Send Messages
        • Upload Files
      • Message History
      • Message Actions
      • Message Counts
      • Translation
      • Typing Indicators
      • API Reference
        • Event
        • Message
    • Presence
      • Configuration
      • Basic Usage
      • Methods
    • Audio
      • Prerequisites
      • Instantiating Audio Service
      • Connect to a Channel
      • Disconnecting Audio Service
      • Push To Talk (PTT)
      • Full Duplex
      • Mute and Unmute Audio
      • Input/Output Device Selection
        • Microphone Selection
        • Speaker Selection
      • Channel Participants
      • Text To Speech Audio (TTS)
      • Automatic Reconnects
      • Handling Events
      • Classes
        • AloAudio
        • AudioUser
        • AudioChannel
        • Participant
    • Video
      • Prerequisites
      • Instantiating Video Service
      • Connect to a Channel
      • Disconnecting Video Service
      • Input Device Selection
        • Microphone Selection
        • Camera Selection
      • Publishing Streams
      • Modifying Published Streams
      • Channel Participants
      • Rendering Streams
        • Local Stream
        • Remote Streams
      • Muting/Unmuting Remote Streams
      • Recording Video (coming soon)
      • Automatic Reconnects
      • Handling Events
      • Classes
        • AloVideo
        • Participant
        • VideoChannel
        • VideoUser
  • ALO APPS
    • Overview
    • Creating Apps
    • Webhooks
      • Verifying Requests from ALO
    • Custom Action Forms
    • Using the ALO Platform API
  • ALO Platform API
    • Overview
    • Authentication
    • API
      • Actions and Periods
      • Channels
      • Channel Messages
      • Channel Users
      • Direct Message Channels
      • Direct Message Channel Chat Messages
      • Direct Message Channel Users
      • Groups
      • Periods
      • Types
      • Users
      • Video Management System
  • Misc
    • Supported Language Codes
Powered by GitBook
LogoLogo

ALO.ai

  • ALO.ai

© Copyright 2025 ALO.ai, Inc. • All Rights Reserved

On this page
  • Channel Participants
  • Channel Participant Related Events
  • Example onParticipantsChanged Event Payload
  • Rendering Participants
  1. SDKs
  2. Video

Channel Participants

PreviousModifying Published StreamsNextRendering Streams

Last updated 4 years ago

Channel Participants

A object represents a user that is connected to a given channel. You can get the list of participants from the object. You will also get a list of participants with the event.

Channel Participant Related Events

Event

Description

onParticipantsChanged

When you join a channel you will there will be an event that gives you a list of the current channel participants. While in a given channel a similar event is fired each time a participant enters or leaves the channel. You will also see this event when a participant publishes/unpublishes or modifies their stream.

Example onParticipantsChanged Event Payload

{
  detail: {
    // currentParticipantId: This is the connectionId of the current user
    currentParticipantId: "871f35b5-479e-4b99-acba-71ab6fe50768",
    
    // Current Channel
    channel: AudioChannel{...},
    
    // List of participants in the channel
    participants: [Participant, Participant]      
  }
}

Rendering Participants

function handleParticipantListChange(event) {
  const participants = event.detail.participants;
  let participantList = participants.map(function (participant) {
    return '<li>' + participant.name + ' (' + participant.id+ ') '+ (participant.isPublishingStream ? ' (published)' : '') + '</li>';
  }).join('');
  
  document.getElementById('channel-participants').innerHTML = `<ul>${participantList}</ul>`;
}

participant
VideoChannel
onParticipantsChanged