MiniAudioPlayer - A utility component for audio stream playback with optional waveform visualization.
This component manages audio playback for remote participants, handling consumer lifecycle,
audio stream management, and optional waveform visualization through component injection. It
integrates with MediaSFU's breakout room system and audio decibel tracking.
Key Features:
Audio Stream Playback: Manages MediaStream playback through HTML audio elements
Consumer Management: Handles WebRTC consumer lifecycle and pause/resume events
Component Injection: Accepts custom MiniAudioComponent for waveform visualization
Breakout Room Awareness: Respects breakout room states and limited access
Audio Decibel Tracking: Integrates with updateParticipantAudioDecibels for level monitoring
Waveform Modal: Optional modal display for audio waveform visualization
Auto Wave Detection: Automatically manages waveform visibility based on audio activity
Mute State Management: Tracks and responds to consumer mute/unmute events
Interval Updates: Triggers reUpdateInter for periodic UI synchronization
Stream Cleanup: Properly removes audio tracks on unmount or stream changes
Ref-Based State: Uses refs for mutable state to avoid unnecessary re-renders
Producer Identification: Associates audio with specific remote producer IDs
MiniAudioPlayer - A utility component for audio stream playback with optional waveform visualization.
This component manages audio playback for remote participants, handling consumer lifecycle, audio stream management, and optional waveform visualization through component injection. It integrates with MediaSFU's breakout room system and audio decibel tracking.
Key Features:
Component
Example
// Basic audio player for remote participant
Example
// Custom waveform visualization component
Example
// Analytics tracking for audio playback
Example
// Integration with MediasfuGeneric using uiOverrides