diff --git a/src/components/display/AudioDisplay.js b/src/components/display/AudioDisplay.js new file mode 100644 index 000000000..c4bc092a3 --- /dev/null +++ b/src/components/display/AudioDisplay.js @@ -0,0 +1,19 @@ +import React, { useEffect, useRef } from "react"; +import PropTypes from "prop-types"; + +const AudioDisplay = ({blob}) => { + const audioRef = useRef(null); + + useEffect(() => { + if (audioRef.current && blob) { + audioRef.current.src = URL.createObjectURL(blob); + } + }, [audioRef, blob]); + + return