Skip to main content

Overview

CometChatVideosBubble renders the video attachment(s) of a media message with batch-aware styling. It is self-extracting: pass the SDK message and the bubble derives its attachments, caption, and alignment itself. The message list uses it automatically for video messages. Key capabilities:
  • Adaptive grid layouts — single video, 2-column, 2×2 grid, and overflow (+N) based on attachment count
  • Poster thumbnails — auto-generated from the thumbnail-generation extension or first frame
  • Duration overlay — displays video duration on each tile
  • Play icon overlay — visual indicator on each video tile
  • Fullscreen viewer — click any video to open in fullscreen player
  • Batch grouping — rendered as one connected group when several media messages are sent together (handled by the message list)
Live Preview — interact with the video bubble.Open in Storybook ↗

Usage


Grid Layouts

The bubble automatically selects a layout based on the number of video attachments: Each tile shows a poster thumbnail, play icon, and duration badge.

Props

message

The video message. The bubble extracts its attachments and caption from it. Required.

alignment

Override incoming/outgoing alignment. Defaults to sender-vs-logged-in-user.

textFormatters

Text formatters applied to the caption (mentions, URLs).

onVideoClicked

Callback fired when a video tile is clicked.

className

Additional CSS class applied to the root element.

CSS Selectors


Next Steps

Image Bubble

Batch-aware image bubble with grid layouts

Audio Bubble

Batch-aware audio bubble with player cards

Message List

Multi-attachment batch grouping in the list

Message Composer

Multi-attachment staging tray