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
  • Send start and stop typing indicators
  • Listen for start and stop typing events
  1. SDKs
  2. Chat

Typing Indicators

Typing indicators allow you to display whether a user is typing in a particular channel.

Send start and stop typing indicators

// user is typing
chat.sendTypingIndicator({ 
    channelId: "alpha",
    isTyping: true
});

// user submits message and has stopped typing
chat.sendTypingIndicator({
    channelId: "alpha",
    isTyping: false
});

sendTypingIndicator({ channelId: string, isTyping: boolean })

Name

Type

Required

Description

channelId

string

yes

The id of the channel associated with the typing event

isTyping

boolean

yes

true /false

Listen for start and stop typing events

chat.addEventListener((event) => {
    switch (event.type) {
        case "typing.start":
            const { channelId, userId, deviceId } = event.data;
            // Update UI to show a user is typing...
            break;
        case "typing.stop":
            const { channelId, userId, deviceId } = event.data;
            // Update UI to show that user has stopped typing.
            break;
        default:
    }
});

The userId and deviceId used to initialize the Chat class are the values that will be included in the typing.start and typing.stop events.

PreviousTranslationNextAPI Reference

Last updated 8 months ago