Crafting chat voice memo cards: Waveform progress bars, durations, and speed toggles
Voice notes are one of the most expressive communication tools on the web. In this lab, we build an interactive voice memo bubble with draggable scrubbers, duration counters, and animated soundwave playback bars.
Copy Elementor / WP Code
In the code studio above, switch to the Elementor / WP tab and click Copy to get the self-contained bundle with chat bubble styling, animated waveform bars, and audio player script.
Insert an HTML Widget
In your WordPress dashboard, edit your review or testimonial section with Elementor (Free or Pro). Drag an HTML widget onto your canvas.
Paste & Update Audio URL
Paste the snippet into the HTML Code box. Replace the audio URL and duration text with your voice recording from the WordPress Media Library.
Features & Best Practices
Sync with Elementor Global Colors
Easily match your site branding by connecting --memo-accent to var(--e-global-color-primary) in the included CSS.
Ultra-Lightweight Chat UI
Renders interactive amplitude scrubbing with sub-2KB footprint and zero external frameworks, keeping your page load times instant.
Frequently Asked Questions
How do I embed interactive voice memo bubbles into Elementor?
Switch to the Elementor / WP tab in the code studio above and click Copy. In WordPress, open your Elementor page, drag an HTML widget into your container or testimonial review section, and paste the code snippet. Replace the audio URL with your recorded voice note link from the WordPress Media Library.
How are the soundwave amplitude bars styled?
The waveform is rendered as a flexbox row of lightweight HTML div elements with varying percentages of height. As audio plays, a .played class toggles from unplayed muted gray to the active brand accent color.
Does this support both incoming and outgoing bubble styles?
Yes. You can switch between Outgoing (sender on right with customized corner tail) and Incoming (receiver on left with avatar) with a single toggle in the control panel.
Can users click directly on the waveform bars to seek playback?
Yes. Each amplitude bar listens for click events and updates the audio playhead to that exact relative timestamp in the recording.
How do I record microphone audio in the browser with the MediaRecorder API?
Request microphone access using navigator.mediaDevices.getUserMedia({ audio: true }). Pass the stream to new MediaRecorder(stream), collect audio data chunks in ondataavailable, and assemble an audio Blob on stop.
What audio formats does the browser MediaRecorder API output (WebM vs WAV)?
Chrome and Firefox output audio/webm;codecs=opus. Safari on iOS and macOS outputs audio/mp4. You can convert recordings to WAV or MP3 client-side using WebAssembly audio encoders.
How do I display a live recording timer and pulsing recording dot in CSS?
Use an active .is-recording class that animates a red circle with animation: pulse 1s infinite alternate; and updates a timestamp string (MM:SS) every second via setInterval.
Can recorded voice memos be downloaded directly as audio files?
Yes. Create a download URL using URL.createObjectURL(audioBlob) and trigger a download anchor (<a download="voice-memo.webm" href="...">) to save the audio file to the user's device.