Skip to content

Commit

Permalink
Merge pull request #1119 from LukasKalbertodt/improve-waveform-box-da…
Browse files Browse the repository at this point in the history
…rk-mode

Remove audio waveform background in dark mode
  • Loading branch information
lkiesow authored Sep 26, 2023
2 parents 999c1c3 + fa639a3 commit f0b725c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/steps/audio-setup/mic-preview.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect, useId, useRef } from "react";
import { useTranslation } from "react-i18next";
import Oscilloscope from "oscilloscope";
import { Spinner } from "@opencast/appkit";
import { Spinner, useColorScheme } from "@opencast/appkit";

import { useDispatch, useStudioState } from "../../studio-state";
import { startAudioCapture, stopAudioCapture } from "../../capturer";
Expand Down Expand Up @@ -111,6 +111,7 @@ type AudioVisualziationProps = {
};

const AudioVisualziation: React.FC<AudioVisualziationProps> = ({ stream }) => {
const isDark = useColorScheme().scheme === "dark";
const canvasRef = useRef<HTMLCanvasElement>(null);

useEffect(() => {
Expand Down Expand Up @@ -142,7 +143,7 @@ const AudioVisualziation: React.FC<AudioVisualziationProps> = ({ stream }) => {
width: "100%",
height: "min(200px, 20vh)",
flex: "1 0 70px",
backgroundColor: "rgba(0,0,0,0.8)",
backgroundColor: isDark ? "transparent" : "rgba(0,0,0,0.8)",
borderRadius: "7px",
}}
/>
Expand Down

0 comments on commit f0b725c

Please sign in to comment.