diff --git a/src/assets/locales/en.json b/src/assets/locales/en.json
index 1353e26a..1fe42710 100644
--- a/src/assets/locales/en.json
+++ b/src/assets/locales/en.json
@@ -804,6 +804,8 @@
"previewLabel": "Subtitle preview:",
"offChoice": "Off",
"onChoice": "On",
+ "autoSelectChoice": "Auto select",
+ "autoSelectDifferentChoice": "Tap again to auto select different subtitle",
"SourceChoice": "Source Subtitles",
"OpenSubtitlesChoice": "External Subtitles",
"loadingExternal": "Loading external subtitles...",
diff --git a/src/components/player/atoms/settings/CaptionsView.tsx b/src/components/player/atoms/settings/CaptionsView.tsx
index fbc8d0f0..366f1931 100644
--- a/src/components/player/atoms/settings/CaptionsView.tsx
+++ b/src/components/player/atoms/settings/CaptionsView.tsx
@@ -312,8 +312,19 @@ export function CaptionsView({
const { t } = useTranslation();
const router = useOverlayRouter(id);
const selectedCaptionId = usePlayerStore((s) => s.caption.selected?.id);
- const { disable } = useCaptions();
+ const { disable, selectRandomCaptionFromLastUsedLanguage } = useCaptions();
+ const [isRandomSelecting, setIsRandomSelecting] = useState(false);
const [dragging, setDragging] = useState(false);
+
+ const handleRandomSelect = async () => {
+ if (isRandomSelecting) return; // Prevent multiple simultaneous calls
+ setIsRandomSelecting(true);
+ try {
+ await selectRandomCaptionFromLastUsedLanguage();
+ } finally {
+ setIsRandomSelecting(false);
+ }
+ };
const setCaption = usePlayerStore((s) => s.setCaption);
const videoTime = usePlayerStore((s) => s.progress.time);
const srtData = usePlayerStore((s) => s.caption.selected?.srtData);
@@ -514,6 +525,22 @@ export function CaptionsView({
{t("player.menus.subtitles.offChoice")}
+ {/* Enable subtitles option */}
+