ausocean / cloud

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

Parameterise auth token URI for broadcast #134

Closed saxon-milton closed 2 weeks ago

saxon-milton commented 2 weeks ago

Resolves issue #131

The bucket object containing the required auth tokens for YouTube Live API usage was hardcoded to that belonging to AusOcean's account, however, we now require the ability to change this depending on the YouTube account for which we want to broadcast to.

We're now storing the Account email in the broadcast config, and using this according to a schema for the object name, which a common function, TokenURIFromAccount enforces. We provide this to the YoutTubeBroadcast service which will use it to get the auth token where required.

These changes also affect health checking and chat message posting so to make things better, we're incorporating this functionality into the broadcast manager/broadcast services.

saxon-milton commented 2 weeks ago

LGTM.

Not sure why handleChatMessage got moved from broadcast.go, though.

It's just because it would need to use BroadcastService.PostChatMessage and I didn't want to parameterise the BroadcastService over just making it a method of BroadcastService.