From 54bc9013aa0463962a1cfd67fa278de3d401d85a Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 30 Apr 2026 12:45:18 +0300 Subject: ja: implement public share landing page and improve error mapping - Add web/share.html with a minimal HTML5 video player, theme variables, centered layout, play overlay, and Back to Home link. - Update handleSharePage to return HTML for browser Accept headers (text/html or empty) and JSON for application/json. Return 410 Gone for expired shares. - Update handleShareStream to map service errors to distinct HTTP codes: ErrShareExpired -> 410, ErrShareNotFound/ErrMediaNotFound -> 404. - Improve ValidateShareToken and StreamSharedMedia to return sentinel errors (ErrShareNotFound, ErrShareExpired, ErrMediaNotFound) instead of generic string errors. - Update and add tests for share page HTML/JSON negotiation and share stream 404/410 responses. --- web/share.html | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 web/share.html (limited to 'web/share.html') diff --git a/web/share.html b/web/share.html new file mode 100644 index 0000000..065e839 --- /dev/null +++ b/web/share.html @@ -0,0 +1,105 @@ + + + + + +Shared Media + + + + +
+

Shared Media

+
+ +
+
+
+
+ Back to Home +
+ + + -- cgit v1.2.3