From c1421de03e9daea9f3864a466f255f5dfa1ad65e Mon Sep 17 00:00:00 2001
From: Pas <74743263+Pasithea0@users.noreply.github.com>
Date: Wed, 25 Jun 2025 16:37:22 -0600
Subject: [PATCH] add open in... button to download menu
---
src/assets/locales/en.json | 5 +
.../player/atoms/settings/Downloads.tsx | 110 ++++++++++++++++++
2 files changed, 115 insertions(+)
diff --git a/src/assets/locales/en.json b/src/assets/locales/en.json
index 7aa0d3d2..dd2d9fbe 100644
--- a/src/assets/locales/en.json
+++ b/src/assets/locales/en.json
@@ -565,6 +565,11 @@
"copyHlsPlaylist": "Copy HLS playlist link",
"downloadSubtitle": "Download current subtitle",
"downloadVideo": "Download video",
+ "openIn": "Open in...",
+ "vlc": "VLC",
+ "iina": "IINA",
+ "outplayer": "Outplayer",
+ "hlsOpenInDisclaimer": "Opening HLS streams in an external player MAY NOT WORK!",
"hlsDisclaimer": "Downloads are taken directly from the provider. P-Stream does not have control over how the downloads are provided.
Please note you are downloading an HLS playlist, it is not recommended to download if you are not familiar with advanced streaming formats. Try different sources for different formats.",
"onAndroid": {
"1": "To download on Android, click the download button then, on the new page, tap and hold on the video, then select save.",
diff --git a/src/components/player/atoms/settings/Downloads.tsx b/src/components/player/atoms/settings/Downloads.tsx
index 77294727..43b0d44c 100644
--- a/src/components/player/atoms/settings/Downloads.tsx
+++ b/src/components/player/atoms/settings/Downloads.tsx
@@ -1,15 +1,75 @@
+import { Listbox } from "@headlessui/react";
import { useCallback, useMemo } from "react";
import { Trans, useTranslation } from "react-i18next";
import { useCopyToClipboard } from "react-use";
import { Button } from "@/components/buttons/Button";
+import { OptionItem } from "@/components/form/Dropdown";
import { Icon, Icons } from "@/components/Icon";
import { OverlayPage } from "@/components/overlays/OverlayPage";
import { Menu } from "@/components/player/internals/ContextMenu";
import { convertSubtitlesToSrtDataurl } from "@/components/player/utils/captions";
+import { Transition } from "@/components/utils/Transition";
import { useOverlayRouter } from "@/hooks/useOverlayRouter";
import { usePlayerStore } from "@/stores/player/store";
+function PlayerDropdown({
+ options,
+ onSelectOption,
+}: {
+ options: OptionItem[];
+ onSelectOption: (option: OptionItem) => void;
+}) {
+ const { t } = useTranslation();
+ const defaultLabel = t("player.menus.downloads.openIn");
+
+ return (
+