bitfocus / companion-module-youtube-live

MIT License
10 stars 12 forks source link

Connection/Authentication Stability and best practices #111

Open Helmi opened 3 months ago

Helmi commented 3 months ago

Hey there,

this isn't really a bug report but more of a question to the community here as I don't know a better place (please point out if there is one).

I'm using companion and the MacMini it runs on once a week for a live stream. Things work okay with everything starting automatically on boot but the YouTube connection carries quite a bunch of problems. The oAuth grant seems to expire weekly. Not sure if that is due to companion not running and not able to refresh it and keep it alive but I seem to somehow have to renew it nearly weekly - sometimes not for whatever reason but then it also might fail during the live stream. Didn't yet come behind the exact issue.

I would let the computer run as it doesn't use that much power but then the refresh frequency is a problem for the rather restricted and unextendable Youtube API limit (10k Daily).

Is there a good best practice to deal with either of those issues? I could imagine a lower update frequency as long as no live stream is running to not have the API limit to be a problem and only lower it as soon as the live stream runs or a button is pressed?

Or is there any good solution to the authentication issue?

Thanks for helping anyway. Helmi

jswalden commented 3 months ago

https://github.com/bitfocus/companion-module-youtube-live/issues/72 exists to add longer-term oAuth support. Fixing that would probably be the best practice. I'd have to think this isn't a large amount of code to write to do this, for someone who understands oAuth already. But I haven't looked at the code and don't know more about the contours of what fixing it would involve, beyond what that issue tells me.