Add an option to share videos via privacy frontend URLs

When enabled (the default), share links to YouTube videos point to the
active source's web watch page instead of youtube.com. Invidious serves
its frontend at the API URL; Piped uses its configured frontend URL.
Videos the active source can't serve (PeerTube, extracted sources) and
sources without a web frontend keep their original links.

The toggle lives in Settings > Layout & Navigation > Sharing on iOS and
macOS, and is shown only when an enabled source has a web watch page.
This commit is contained in:
Arkadiusz Fal
2026-09-18 23:57:34 +02:00
parent 172d712f25
commit d22abf6088
13 changed files with 128 additions and 8 deletions

View File

@@ -10,6 +10,8 @@
import SwiftUI
struct PlayerPillButtonView: View {
@Environment(\.appEnvironment) private var appEnvironment
let configuration: ControlButtonConfiguration
let isPlaying: Bool
let hasNext: Bool
@@ -199,7 +201,7 @@ struct PlayerPillButtonView: View {
private var shareButton: some View {
Group {
if let video {
ShareLink(item: video.shareURL) {
ShareLink(item: appEnvironment?.shareURL(for: video) ?? video.shareURL) {
genericButtonLabel
}
.buttonStyle(.plain)