Durss / Twitchat

Full featured Twitch chat alternative to fill gaps from the official one.
https://twitchat.fr
GNU General Public License v3.0
269 stars 30 forks source link

Add an action to change the CSS in OBS source #73

Closed Toniob closed 2 months ago

Toniob commented 4 months ago

Hello,

For the OBS Browser Source, currently, we can have an action to change the url of the source.

Do you think it would be possible to add an action to change the custom css value as well ?

Thanks

Durss commented 4 months ago

Hello !

If I understand correctly, you're talking about the OBS trigger action? And you'd like to be able to change the custom CSS of a browser source from this?

That would technically be possible, but, OBS would reload the source anytime the CSS is changed. For overlays a little heavy that would make it disappear for a few seconds in worst cases.

What would be your use case?

Toniob commented 4 months ago

That’s exactly it.

The use case would be to have a layout made out of an html page. And the main color of the layout would be in the custom css of the browser source. And viewers would be able to change the color of the layout with commands or channel points.

Durss commented 4 months ago

But wouldn't the refresh of the browser source at any CSS update be annoying ? As said before, changing any parameter of a browser source makes OBS completely reload that source. Your overlay would basically disapear and reload after any CSS update. Depending on the complexity of the page it would be more or less visible.

Wouldn't you be able to achieve what you want with OBS filters ? You'd need to set predefined filters for each colors as Twitchat doesn't allow to define filter's properties yet tho.

Toniob commented 4 months ago

For this idea in particular, I guess it’s doable with filters in obs. But CSS is much more than color changes. Maybe I’ll have more ideas with this later.

I try to keep the layout pages as simple as possible. No pictures, no videos. Just html / css / a few animations, that’s it. The best way to know if reloading is an issue is to test.

But if you think it’s a useless feature or that it’s to hard to implement, I’ll find another way.

Toniob commented 3 months ago

What do you think ? Is it a good idea ?

Durss commented 2 months ago

Next version will have this ;) image

Toniob commented 2 months ago

yeeeaaaahhhh ! so great ! Thank you so much.