mirror of
https://github.com/yattee/yattee.git
synced 2026-10-28 07:27:18 +00:00
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:
@@ -191,7 +191,7 @@ struct VideoSwipeActionsModifier: ViewModifier {
|
||||
private func shareVideo() {
|
||||
#if os(iOS)
|
||||
let activityVC = UIActivityViewController(
|
||||
activityItems: [video.shareURL],
|
||||
activityItems: [appEnvironment?.shareURL(for: video) ?? video.shareURL],
|
||||
applicationActivities: nil
|
||||
)
|
||||
if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene,
|
||||
@@ -217,7 +217,7 @@ struct VideoSwipeActionsModifier: ViewModifier {
|
||||
#elseif os(macOS)
|
||||
let pasteboard = NSPasteboard.general
|
||||
pasteboard.clearContents()
|
||||
pasteboard.setString(video.shareURL.absoluteString, forType: .string)
|
||||
pasteboard.setString((appEnvironment?.shareURL(for: video) ?? video.shareURL).absoluteString, forType: .string)
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user