mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-21 12:49:06 +00:00
more styling + auto scroll behavior
This commit is contained in:
@@ -66,7 +66,7 @@ export default function Recorder(props) {
|
||||
});
|
||||
const wsWrapper = _wavesurfer.getWrapper();
|
||||
wsWrapper.style.cursor = "pointer";
|
||||
wsWrapper.style.backgroundColor = "lightgray";
|
||||
wsWrapper.style.backgroundColor = "#e0c3fc42";
|
||||
wsWrapper.style.borderRadius = "15px";
|
||||
|
||||
_wavesurfer.on("play", () => {
|
||||
@@ -114,6 +114,7 @@ export default function Recorder(props) {
|
||||
<AudioInputsDropdown setDeviceId={setDeviceId} disabled={isRecording} />
|
||||
|
||||
<button
|
||||
className="w-20"
|
||||
onClick={handleRecClick}
|
||||
data-color={isRecording ? "red" : "blue"}
|
||||
disabled={!deviceId}
|
||||
@@ -122,6 +123,7 @@ export default function Recorder(props) {
|
||||
</button>
|
||||
|
||||
<button
|
||||
className="w-20"
|
||||
id="play-btn"
|
||||
onClick={handlePlayClick}
|
||||
data-color={isPlaying ? "orange" : "green"}
|
||||
@@ -129,8 +131,9 @@ export default function Recorder(props) {
|
||||
{isPlaying ? "Pause" : "Play"}
|
||||
</button>
|
||||
</div>
|
||||
<div ref={waveformRef} className="w-full"></div>
|
||||
<div ref={waveformRef} className="w-full shadow-xl rounded-2xl"></div>
|
||||
{/* TODO: Download audio <a> tag */}
|
||||
{/* TODO: current time / audio duration */}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user