# Live Music/Streaming Integration Proposal ## What Primal Does Looking at the Primal live music example, they're using **NIP-53 (Live Activities)** to: - Stream live music performances - Show current participants/listeners - Enable live chat during streams - Display stream metadata (title, description, thumbnail) - Track when streams are live/planned/ended --- ## How It Could Work for Skate Events ### Use Case: Live Skate Contest Stream ``` 🏁 Venice Beach Street Contest 2025 πŸ“Ί LIVE NOW - 234 watching 🎡 DJ spinning beats πŸ›Ή Finals happening now [Watch Stream] [Join Chat] [⚑ Zap] ``` **Benefits**: - Remote viewers can watch contests - DJs can stream music during sessions - Community stays connected - Builds hype for events - Records preserved after event --- ## Technical Implementation ### Option 1: Full Live Streaming (NIP-53) - COMPLEX **What's needed:** - Video streaming server (expensive, complex) - HLS/RTMP encoding (technical knowledge required) - Chat system (kind:1311 live chat messages) - Real-time participant tracking - Stream key management **Estimated effort**: 2-3 weeks **Ongoing costs**: $50-200/month for streaming infrastructure **Complexity**: High (video encoding, CDN, bandwidth) **Verdict**: ❌ Too complex for MVP, expensive ongoing costs --- ### Option 2: Embedded Music Player (SIMPLE) βœ… **What's needed:** - Just embed existing streaming links - No hosting required - No encoding needed - Use existing platforms (YouTube Live, Twitch, Soundcloud, Spotify) **Estimated effort**: 4-6 hours **Ongoing costs**: $0 **Complexity**: Low (just iframe embeds) **Verdict**: βœ… Perfect for getting started! --- ## SIMPLE PROPOSAL: Event Music Integration Instead of building a complex streaming platform, we **enhance existing events** with music/stream embeds. ### What Users See #### On Event Detail Page (`/event/:pubkey/:id`) ``` β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ 🏁 Venice Beach Street Contest β”‚ β”‚ πŸ“… March 15, 2025 β€’ 2:00 PM β”‚ β”‚ πŸ“ Venice Beach Skatepark β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ β”‚ β”‚ 🎡 LIVE MUSIC β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ [Embedded Spotify/YouTube] β”‚ β”‚ β”‚ β”‚ DJ LowKey - Skate Mix Vol. 3 β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ ▢️ πŸ”Šβ”€β”€β”€β”€β”€β”€ πŸ” β™‘ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ πŸ’¬ Live Chat (42 messages) β”‚ β”‚ [Show Chat] β†’ β”‚ β”‚ β”‚ β”‚ πŸ“Š 234 people interested β”‚ β”‚ ⚑ 12,450 sats raised β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ``` ### What It Supports #### Music Platforms (Easy Embeds) - **Spotify**: Playlists, albums, tracks - **YouTube**: Live streams, videos - **SoundCloud**: Mixes, tracks, playlists - **Mixcloud**: DJ sets, radio shows - **Apple Music**: Playlist embeds - **Bandcamp**: Album players #### Example Event Tags ```json { "kind": 31923, "tags": [ ["d", "venice-contest-2025"], ["title", "Venice Beach Street Contest"], ["start", "1710518400"], ["g", "9q5ctr"], ["location", "Venice Beach Skatepark"], ["t", "skateboarding"], ["t", "contest"], // NEW: Music integration ["music", "spotify:playlist:37i9dQZF1DXcBWIGoYBM5M"], ["stream", "https://youtube.com/live/abc123xyz"], ["streaming", "https://twitch.tv/veniceskate"] ], "content": "Annual street skating contest..." } ``` --- ## UI/UX Design Concept ### Event Page with Music Player ``` β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ ← Back to Events β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ β”‚ β”‚ 🎸 VENICE BEACH STREET CONTEST 2025 β”‚ β”‚ πŸ“… Sat, Mar 15 β€’ 2:00 PM - 8:00 PM β”‚ β”‚ πŸ“ Venice Beach Skatepark, CA β”‚ β”‚ β”‚ β”‚ πŸ”΄ LIVE NOW β€’ 234 watching β”‚ β”‚ β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ πŸ“Ή LIVE STREAM β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ [YouTube Embed / Twitch] β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ 🎡 Event Soundtrack β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ DJ LowKey - Skate Mix Vol. 3 β”‚ β”‚ β”‚ β”‚ [Spotify Player Embed] β”‚ β”‚ β”‚ β”‚ ▢️ ⏸️ ⏭️ πŸ”Šβ”€β”€β”€β”€β”€β”€β”€β”€β”€ 2:34 / 45:12 β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ β”‚ β”‚ πŸ“Š EVENT STATS β”‚ β”‚ β€’ 234 people interested β”‚ β”‚ β€’ 12,450 sats raised β”‚ β”‚ β€’ 42 comments β”‚ β”‚ β”‚ β”‚ ⚑ Support This Event β”‚ β”‚ [Zap 100] [Zap 500] [Zap 1000] β”‚ β”‚ β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ β”‚ β”‚ πŸ“ DESCRIPTION β”‚ β”‚ Annual street skating contest featuring β”‚ β”‚ local legends and up-and-coming talent... β”‚ β”‚ β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ β”‚ β”‚ πŸ’¬ LIVE CHAT (42 messages) β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ Sarah: Let's go! πŸ”₯ β”‚ β”‚ β”‚ β”‚ Mike: That kickflip was insane β”‚ β”‚ β”‚ β”‚ Alex: ⚑ just zapped 500 sats! β”‚ β”‚ β”‚ β”‚ ... β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ [Send message...] β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ``` --- ## Mobile Experience (Responsive) ### Mobile Layout ``` β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ ← Venice Contest β”‚ β”‚ πŸ”΄ LIVE β€’ 234 watching β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ β”‚ β”‚ [Video Player] β”‚ β”‚ [Full screen toggle] β”‚ β”‚ β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ Tabs: β”‚ β”‚ [Chat] [Info] [Music] β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ β”‚ β”‚ (Tab content) β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ``` **Mobile Features:** - Swipe between tabs (Chat/Info/Music) - Picture-in-picture for video - Floating music player (sticks to bottom) - Full-screen video mode - Quick zap buttons --- ## Implementation Phases ### Phase 1: Basic Music Embeds (4-6 hours) βœ… RECOMMENDED **What to build:** 1. Add music/streaming URL fields to event creation form 2. Display embedded players on event detail pages 3. Support Spotify, YouTube, SoundCloud 4. Simple iframe embeds (no API needed) **Benefits:** - βœ… Zero infrastructure costs - βœ… Works immediately - βœ… No technical complexity - βœ… Enhances existing events **User flow:** ``` Event Organizer: 1. Creates event 2. Adds Spotify playlist URL 3. Publishes event Event Viewer: 1. Opens event page 2. Sees embedded music player 3. Listens while reading event details 4. Gets hyped for the event! ``` --- ### Phase 2: Live Chat (NIP-53) (1-2 days) **What to build:** 1. Implement kind:1311 live chat messages 2. Add chat UI to event pages 3. Real-time updates via Nostr subscriptions 4. Moderation tools (for event organizers) **Benefits:** - Community interaction during events - Real-time engagement - No separate chat platform needed - All on Nostr protocol --- ### Phase 3: Live Streaming (2-3 weeks) - FUTURE **What to build:** 1. Full NIP-53 implementation 2. Streaming server integration 3. Participant tracking 4. Status management (planned/live/ended) **Benefits:** - Professional live streaming - Own the platform - Full control **Challenges:** - Expensive infrastructure - Complex setup - Requires technical expertise - Ongoing maintenance --- ## Recommended Approach: START SIMPLE ### Step 1: Music Embeds (This Weekend) Add to event creation form: ``` β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Music / Playlist (optional) β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ Spotify/YouTube/SC URL β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ Examples: β”‚ β”‚ β€’ spotify:playlist:abc123 β”‚ β”‚ β€’ youtube.com/watch?v=xyz β”‚ β”‚ β€’ soundcloud.com/dj/mix β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ``` Display on event pages: - Parse URL type (Spotify/YouTube/etc) - Render appropriate embed - Fallback to link if embed fails **Time**: 4-6 hours **Cost**: $0 **Complexity**: Low --- ### Step 2: Live Stream Links (Add to Step 1) Same as music embeds, but for live streams: ``` Live Stream URL (optional) β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ YouTube/Twitch URL β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ Examples: β€’ youtube.com/live/abc123 β€’ twitch.tv/channel ``` Show "πŸ”΄ LIVE NOW" badge when stream is active **Time**: +2 hours **Cost**: $0 **Complexity**: Low --- ### Step 3: Live Chat (Next Week) Implement NIP-53 live chat: - Kind:1311 messages - Real-time updates - Chat UI component - Moderation tools **Time**: 1-2 days **Cost**: $0 (just relay bandwidth) **Complexity**: Medium --- ## UI Component Breakdown ### 1. Music Player Card (New Component) ```tsx 🎡 Event Soundtrack {/* Spotify/YouTube/SoundCloud embed */}