Foxar / SolidStream

A fullstack livestreaming website, created as exercise in Symfony and React,js
3 stars 3 forks source link

Stream verification method #6

Closed Foxar closed 3 years ago

Foxar commented 3 years ago

This is the idea I have for stream verification method:

A Stream Model exists within the backend API. Whenever a user wants to start streaming:

  1. They make the appropriate action on SPA, which notifies the backend.
  2. Backend creates a stream within the database, giving it a unique stream key.
  3. Frontend displays the appropriate RTMP endpoint URL, appended with the stream key for the user to use (for example in OBS)
  4. User starts streaming to the RTMP endpoint
  5. nginx-rtmp detects the attempt, calling a verification method of StreamController
  6. StreamController looks through the database, trying to verify the stream key used.
    • If it's verified, it returns some kind of 2xx HTTP code response, giving permission to start the stream.
    • If it can't be verified, it returns some kind of 4xx HTTP code response, signifying lack of permission.
  7. Depending on the response, nginx-rtmp either commences the stream and starts producing HLS files, or aborts the stream.
Foxar commented 3 years ago

This is essentially completed.