From b62d22370b9e2c7a51ad15b7d3208334376e4393 Mon Sep 17 00:00:00 2001 From: goon-foss Date: Tue, 14 Jul 2026 22:48:16 +0300 Subject: [PATCH] feat(player): copy video link button User request (07-10): a quick way to grab the direct video URL to share or open elsewhere. Added a link icon in the player top bar that copies the current playing URL to the clipboard (direct CDN URL for most sources, so it pastes into VLC/MX/a browser; proxy-wrapped/referer-bound sources are best-effort). Co-Authored-By: Claude Opus 4.8 --- mobile/src/changelog.ts | 7 +++++++ mobile/src/screens/PlayerScreen.tsx | 19 +++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/mobile/src/changelog.ts b/mobile/src/changelog.ts index e5f1f65..9728a2a 100644 --- a/mobile/src/changelog.ts +++ b/mobile/src/changelog.ts @@ -16,6 +16,13 @@ export type ChangelogEntry = { }; export const CHANGELOG: ChangelogEntry[] = [ + { + id: '2026-07-14c', + date: 'July 2026', + items: [ + 'Copy video link: while a video is playing, tap the link icon in the top bar to copy its URL, then paste it into a browser or a player like VLC or MX Player. Works best for direct sources.', + ], + }, { id: '2026-07-14b', date: 'July 2026', diff --git a/mobile/src/screens/PlayerScreen.tsx b/mobile/src/screens/PlayerScreen.tsx index 0162340..f611351 100644 --- a/mobile/src/screens/PlayerScreen.tsx +++ b/mobile/src/screens/PlayerScreen.tsx @@ -6,6 +6,7 @@ import { useEvent } from 'expo'; import * as Haptics from 'expo-haptics'; import * as ScreenOrientation from 'expo-screen-orientation'; import { useVideoPlayer, VideoView, type VideoSource } from 'expo-video'; +import * as Clipboard from 'expo-clipboard'; import React from 'react'; import { ActivityIndicator, @@ -188,6 +189,21 @@ function NativeVideoPlayer({ params }: { params: RouteParams }) { setControlsVisible(true); }, [player]); + // Kopiuj link odtwarzanego wideo (direct CDN / embed hostera) do schowka — user może + // wrzucić do VLC/MX/przeglądarki albo udostępnić (zgłoszenie 07-10). + const copyLink = React.useCallback(async () => { + setControlsVisible(true); + try { + await Clipboard.setStringAsync(url); + Alert.alert( + 'Link copied', + 'The video link is on your clipboard. Paste it into a browser or a player like VLC or MX Player.', + ); + } catch { + // ignore + } + }, [url]); + const statusEvent = useEvent(player, 'statusChange', { status: player.status }); const status = statusEvent?.status ?? player.status; const playerError = statusEvent?.error; @@ -839,6 +855,9 @@ function NativeVideoPlayer({ params }: { params: RouteParams }) { ) : ( )} + + 🔗 + {muted ? '🔇' : '🔊'}