Improve video sharing functionality and page meta tags
Update `bunny-video-modal.tsx` to support custom share domains and modify `VideoPage.tsx` to dynamically update meta tags (title, description, Open Graph, Twitter Card) for enhanced social sharing, using `VITE_SHARE_DOMAIN` environment variable for custom domain configuration. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 074b0e4c-6171-43bd-aa98-f9e04623ca14 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/074b0e4c-6171-43bd-aa98-f9e04623ca14/Sy6XHzr
This commit is contained in:
@@ -111,7 +111,9 @@ export default function BunnyVideoModal({ video, isOpen, onClose, onEdit, videos
|
||||
|
||||
const getShareUrl = () => {
|
||||
if (!video?.id) return window.location.origin;
|
||||
return `${window.location.origin}?video=${video.id}`;
|
||||
// Use custom domain if set, otherwise current domain
|
||||
const baseUrl = import.meta.env.VITE_SHARE_DOMAIN || window.location.origin;
|
||||
return `${baseUrl}/video/${video.id}`;
|
||||
};
|
||||
|
||||
const copyToClipboard = async () => {
|
||||
|
||||
Reference in New Issue
Block a user