feat(content): seller-picked payment methods + music always in the bottom bar + video PiP
- Paid sharing: AccessControl::Paid gains an accepted-methods list (lightning/onchain/ecash/fedimint; empty = all, back-compat). Sellers pick methods in ShareModal, gated on what the node can actually receive (LND running/channel open, ecash wallet, fedimint joined) with an ⓘ that explains exactly how to enable a missing rail. Enforced server-side (the invoice/onchain mints refuse non-accepted methods; the serve gate only honors tokens/hashes for accepted rails) and the buyer's pay modal only offers what the seller accepts. - Purchased music: the two remaining lightbox paths now use the bottom-bar player — the immediate post-ecash-purchase viewer and the Paid Files tab's window.open. - Picture-in-picture buttons on the peer video player and the cloud media lightbox (utils/pip.ts; Chromium/Safari, no-op elsewhere). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
d5fc3d01a4
commit
f72d4b92ac
@@ -0,0 +1,19 @@
|
||||
/** Video Picture-in-Picture helpers (Chromium/Safari; no-ops elsewhere).
|
||||
* Kiosk note: PiP is skipped on the WM-less kiosk X session by callers that
|
||||
* care — an unmanaged popup there is unusable (docs/tv-input-iframe-apps.md
|
||||
* sibling investigation, task #18). */
|
||||
|
||||
export const pipSupported =
|
||||
typeof document !== 'undefined' &&
|
||||
'pictureInPictureEnabled' in document &&
|
||||
document.pictureInPictureEnabled
|
||||
|
||||
export async function togglePip(video: HTMLVideoElement | null | undefined): Promise<void> {
|
||||
if (!video || !pipSupported) return
|
||||
try {
|
||||
if (document.pictureInPictureElement === video) await document.exitPictureInPicture()
|
||||
else await video.requestPictureInPicture()
|
||||
} catch {
|
||||
// Permission/transient failure — the button is best-effort.
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user