AFK-AlignedFamKernel / afk_monorepo

AFK: Aligned Fam Kernel - Monorepo
https://afk-community.xyz
MIT License
15 stars 38 forks source link

Live stream #225

Closed addegbenga closed 3 weeks ago

addegbenga commented 3 weeks ago

PR Overview

This PR adds core functionality for screen and video sharing and sets up the initial infrastructure for live streaming within the app.

Key Features:

  1. Screen and Video Sharing: Focused on Expo Web, enabling users to share screens and video sources seamlessly.
  2. Stream Buffer Processing with Fastify: Streams are transmitted as buffers to the Fastify backend through sockets. The backend processes the buffer using fluent-ffmpeg and saves the output to Cloudinary's CDN. (Note: Cloudinary credentials are required for this configuration, with potential future support for Pinata CDN.)
  3. NIP-53 live_stream Hook: Initial creation of a hook to support live_stream as per NIP-53 standards, though UI integration is pending.
  4. Socket Connection Context: Added a dedicated context to manage socket connections, supporting smoother data flow and modularity.

Pending Tasks:

  1. UI for Event/Stream Creation: Develop a user interface to facilitate the creation of events or streams, aligning with the NIP-53 specifications.
  2. Event Retrieval Hooks: Add more hooks to enable fetching and displaying created events for users.
  3. UI for Event/Stream Listings: Create a display interface showing all events/streams initiated by a Nostr user. Each event should have a "Join Stream" button, leading users to a live viewing screen if the stream is active.
  4. Backend Testing: Conduct further testing of the backend implementation to ensure stability and performance.
  5. Saving Streaming URL: Once a Nostr user initiates a stream/event, the streaming URL should be saved to the event with the ["streaming", "<URL>"] tag as specified in NIP-53. This will allow users who join the stream to access and watch it through the provided URL.
  6. Enabling live chat on stream

See a bit of demo of how it currently works: Here


This PR builds the foundation for full-featured streaming support, with additional UI integration and event handling planned in future updates.