π¬ Reels Features
Reels are TikTok-style short-form videos that allow users to watch, interact with, and share vertical video content.
β¨ Overviewβ
XHub Chat's Reels system provides:
- π± Infinite Scroll Feed - Endless scrolling to watch videos continuously
- π₯ Video Player - Play videos with full controls
- π¬ Comments - Real-time comments and interactions
- β€οΈ Likes & Reactions - Like and react to reels
- π Pagination - Auto-load more reels
- β‘ Performance - Optimized memory with EphemeralStore
π Key Featuresβ
Feed & Discoveryβ
- Reels Feed - Display reels list with infinite scroll
- My Reels - Manage and display user's own reels
- Load More - Auto-load more reels on scroll
- Refresh Feed - Refresh reels list
Player & Interactionβ
- Reel Player - Play video with Room instance
- Comments - View and send comments
- Likes & Views - Like and view counts
π― Use Casesβ
Social Media Feedβ
// TikTok-style vertical feed
<ReelsFeed autoPlay infiniteScroll />
User Profileβ
// Grid view cα»§a reels ngΖ°α»i dΓΉng
<UserReelsGrid userId="@user:server.com" />
Discover Pageβ
// KhΓ‘m phΓ‘ reels mα»i
<DiscoverReels category="trending" />
ποΈ Architectureβ
EphemeralStoreβ
Reels are stored in memory (not persisted to IndexedDB) for optimal performance:
// Reels only exist in current session
const reelsStore = client.getReelsStore();
const rooms = await reelsStore.getSavedRooms();
Virtual Roomsβ
Each reel is a virtual room with category 'reel':
// Auto-generated room ID
const roomId = `reel_${reelId}`;
π¨ Supported Platformsβ
- @xhub-chat/core - Core APIs and client methods
- @xhub-chat/react - React hooks optimized for Reels
π Getting Startedβ
Get started with Reels Feed β