diff --git a/client/src/components/video-modal.tsx b/client/src/components/video-modal.tsx index 9b2e4f6..f0eb639 100644 --- a/client/src/components/video-modal.tsx +++ b/client/src/components/video-modal.tsx @@ -225,9 +225,26 @@ export default function VideoModal({ video, isOpen, onClose }: VideoModalProps) const copyToClipboard = async () => { try { await navigator.clipboard.writeText(getShareUrl()); - alert('Link copied to clipboard!'); + // Simple notification instead of alert + const notification = document.createElement('div'); + notification.textContent = 'Link copied!'; + notification.className = 'fixed top-4 right-4 bg-green-500 text-white px-4 py-2 rounded-lg z-50 transition-opacity duration-300'; + document.body.appendChild(notification); + setTimeout(() => { + notification.style.opacity = '0'; + setTimeout(() => document.body.removeChild(notification), 300); + }, 2000); + setShowShareMenu(false); } catch (error) { console.error('Failed to copy link:', error); + // Fallback for older browsers + const textArea = document.createElement('textarea'); + textArea.value = getShareUrl(); + document.body.appendChild(textArea); + textArea.select(); + document.execCommand('copy'); + document.body.removeChild(textArea); + setShowShareMenu(false); } }; @@ -288,41 +305,50 @@ export default function VideoModal({ video, isOpen, onClose }: VideoModalProps) {/* Share Menu */} {showShareMenu && (
-
+
+
+ Share Video +
+ - - Share on Facebook +
+ + Facebook +
- - Share on Twitter +
+ + Twitter +
- - Share on WhatsApp +
+ + WhatsApp +
- +
+ 📋 +
+ Copy Link +
)} diff --git a/replit.md b/replit.md index 3285a68..121bb08 100644 --- a/replit.md +++ b/replit.md @@ -12,6 +12,9 @@ VideoStream is a fully functional video streaming platform that integrates direc - ✅ **Bunny.net Integration**: Complete integration with private video library using signed URLs for secure access - ✅ **Error Handling**: Robust error handling with HLS recovery and iframe fallback options - ✅ **Performance**: Optimized video loading with adaptive bitrate streaming and proper buffering +- ✅ **Social Media Sharing**: Implemented social sharing for Facebook, Twitter, WhatsApp with custom share menu +- ✅ **Google Ads Manager**: Added Google IMA SDK integration for video monetization support +- ✅ **Copy Link Feature**: Easy link copying with visual feedback notifications ## User Preferences