ausocean / cloud

GNU General Public License v3.0
1 stars 1 forks source link

broadcast: reuse the same broadcast object when there's a failure. #42

Open saxon-milton opened 1 month ago

saxon-milton commented 1 month ago

Currently when a broadcast fails, another one is created; for various failure reasons, this can happen multiple times, and to the YouTube subscribers, it appears as different streams in their feed. This is undesirable and we should figure out how to reuse the same broadcast to retry. Or at the very least delete the old one programmatically so that two don’t exist at the same time.

ao-david commented 2 weeks ago

Given that the config is now stateful (from my understanding), we should just be able to reuse the existing broadcast ID, RTMP url etc if the last time that it was update was the current day.

We should still be careful and make sure that we can still request a create a new stream if there is actually an issue with the youtube end of things at some point.

in broadcast_manager.go:

when we call svc.CreateBroadcast() we should see if there is a id and RTMPurl associated with the config already (current day) and then make a decision from there.