diff --git a/enjoy/src/renderer/components/medias/media-current-recording.tsx b/enjoy/src/renderer/components/medias/media-current-recording.tsx
index 56d92677..234e97b8 100644
--- a/enjoy/src/renderer/components/medias/media-current-recording.tsx
+++ b/enjoy/src/renderer/components/medias/media-current-recording.tsx
@@ -45,8 +45,7 @@ import { t } from "i18next";
import { formatDuration } from "@renderer/lib/utils";
import { useHotkeys } from "react-hotkeys-hook";
-export const MediaCurrentRecording = (props: { height?: number }) => {
- const { height } = props;
+export const MediaCurrentRecording = () => {
const {
layout,
isRecording,
@@ -238,11 +237,12 @@ export const MediaCurrentRecording = (props: { height?: number }) => {
if (!ref.current) return;
if (isRecording) return;
if (!currentRecording?.src) return;
+ if (!layout?.playerHeight) return;
const ws = WaveSurfer.create({
container: ref.current,
url: currentRecording.src,
- height,
+ height: layout.playerHeight,
barWidth: 2,
cursorWidth: 1,
autoCenter: true,
@@ -288,7 +288,7 @@ export const MediaCurrentRecording = (props: { height?: number }) => {
return () => {
ws?.destroy();
};
- }, [ref, currentRecording, isRecording, height]);
+ }, [ref, currentRecording, isRecording, layout?.playerHeight]);
useEffect(() => {
setIsComparing(false);
@@ -406,7 +406,7 @@ export const MediaCurrentRecording = (props: { height?: number }) => {
[player]
);
- if (isRecording) return
;
+ if (isRecording) return
;
if (!currentRecording?.src)
return (
@@ -477,7 +477,7 @@ export const MediaCurrentRecording = (props: { height?: number }) => {
/>
{
- height >= 192 && <>
+ layout?.name === 'lg' && <>