Best way to allow player to connect no matter what and then change stream content serverside?

snon

New Member
The use-case is this:
- Clients should be able to connect ahead of time to a "meeting" (so we can see that the user is "ready")
- Until the meeting starts we would like to be able to "push" video i.e. instructions, ads etc
- When the meeting begins we want to connect another stream (i.e. 2-way chat)
- Potentially back to another stream afterwards
- We want to generate unique ids for all streams and never reveal the actual stream ids of the content

Effectively we are looking for a "forwarder" or "alias" functionallity but have not found anything in the manual that suggests that this is available.

Ideas? We started looking into mixer (i.e. create a mixer for each client, connect to that and update the published stream(s) as we progress) but does not sound like the best solution...

Thanks in advance!
 

Max

Administrator
Staff member
Good day.
Mixer looks excessive for the described case. You can implement the logic on frontend:
1. Client connects to the server before metting starts.
2. Frontend requests to play ads video.
3. When meeting begins, frontend stops playing ads video, publishes client local video and plays remote participant video.
This require some work on backend using REST hooks. Please see this thread where playing adverts to the stream implementation based on /OnDataEvent hook and /data/send REST API query is discusses.
- We want to generate unique ids for all streams and never reveal the actual stream ids of the content
You can use REST hooks /publishStream and /playStream to change stream names from client visible to real.
 

snon

New Member
Many thanks for this - pointed us in the right direction. Have now implemented webhooks and renaming of streams.
 
Top