Skip to content

Instantly share code, notes, and snippets.

@outrageaudio
outrageaudio / gist:9222b7ffd7221dcf2e307c9c06405fd2
Created October 19, 2023 06:50
Framer Code Component MP3 Player With Waveform (no Wavesurfer.js)
import * as React from "react"
import { Frame, addPropertyControls, ControlType } from "framer"
export function SamplePlayer(props) {
const canvasRef = React.useRef(null)
const [isPlaying, setIsPlaying] = React.useState(false)
const audioRef = React.useRef(new Audio(props.audioFile))
React.useEffect(() => {
if (props.audioFile) {