gocast
gocast copied to clipboard
Only one streaming key for each course
Motivation and Context
Closes #124 Currently, every time a lecturer starts a new self-stream, they have to go into their streaming software and change the stream server and key. This is a bit cumbersome as most lecturers only need to stream to one course, and therefore the credentials should be course-specific, instead of stream-specific.
Description
Each course now has it's own stream key, which is generated when the course is created. Every time a new stream is created, it's stream key will default to the course stream key.
The stream key of a course can be regenerated in the course -> settings tab. This might be used if the stream key is leaked, or to re-sync all the stream keys should they have been changed individually.
The stream key of a stream can be regenerated in the Edit Lecture tab on the course page, this might be used for hosting concurrent streams of a course. Here the stream key can also be restored to the course stream key.
Since the worker can no longer identify streams by their key, it now identifies a stream by key and time. This will cause problems if stream times overlap within 30 minutes.
Steps for Testing
Prerequisites:
- 1 Lecturer
- 1 Self-Stream setup
- Log in
- Navigate to a course or create a new one
- Create some Live-streams, notice they will all have the same key
- Press Edit Lecture -> Regenerate Key of a Stream, notice it will no longer use the same key as the other streams in that course
- Navigate to the course settings tab and press Regenerate course wide stream keys, notice that all the stream keys will change and will once again all be the same
- Regenerate Key of a Stream again
- Press Edit Lecture -> Restore Key, notice it will once again use the same key as the other streams in that course
Screenshots
Changing the key of a specific stream
Changing the key of all stream in course
This PR is the same as #1242 but with a cleaned up git history