Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

chore: subtitles sizing on mobile (#780)

Ameer Al Ashhabbb7061205e41
diff --git a/apps/web/app/s/[videoId]/_components/CapVideoPlayer.tsx b/apps/web/app/s/[videoId]/_components/CapVideoPlayer.tsx
index 136ad9664..ac6dbacb4 100644
--- a/apps/web/app/s/[videoId]/_components/CapVideoPlayer.tsx
+++ b/apps/web/app/s/[videoId]/_components/CapVideoPlayer.tsx
@@ -333,8 +333,9 @@ export function CapVideoPlayer({
{currentCue && toggleCaptions && (
<div
className={clsx(
- "absolute left-1/2 transform -translate-x-1/2 text-xl z-40 pointer-events-none bg-black/80 text-white px-4 py-2 rounded-md text-center max-w-[80%] transition-all duration-300 ease-in-out",
- controlsVisible || videoRef.current?.paused ? 'bottom-20' : 'bottom-12'
+ "absolute left-1/2 transform -translate-x-1/2 text-sm sm:text-xl z-40 pointer-events-none bg-black/80 text-white px-3 sm:px-4 py-1.5 sm:py-2 rounded-md text-center transition-all duration-300 ease-in-out",
+ "max-w-[90%] sm:max-w-[480px] md:max-w-[600px]",
+ controlsVisible || videoRef.current?.paused ? 'bottom-16 sm:bottom-20' : 'bottom-3 sm:bottom-12'
)}
>
{currentCue}