obsproject / obs-browser

CEF-based OBS Studio browser plugin
GNU General Public License v2.0
776 stars 221 forks source link

Automatically hide browser source on some status codes #118

Closed lommes closed 4 years ago

lommes commented 6 years ago

It would be nice if we can choose to automatically hide browser source if some http status codes (e.g. 500,502,503,504) are present.

kuhnchris commented 5 years ago

Hide as in? Disable the Source? Technically for that there is a "activate_source" and "deactivate_source" in libobs/obs-source.c but I do not see this exposed to the API anywhere, so I assume right now: no, and it would require us to make this accessable via API (through UI) and then add a new parameter in here and react on the page load event and the new parameter to hide on given status code(s).

Please tag this as a feature-request as it is not a issue. ;-)

Thanks

dori4n commented 5 years ago

This seems like a bad idea. If there is some sort of error page to be displayed, it should be shown to the user so they can take appropriate action as soon as possible, rather than silently fail. This is especially so, since a lot of what people put in a browser source is something that is usually fully transparent, and then suddenly displays something on top of it when some external event happens. Silently failing means hiding from the user that there won't be anything displayed when they would expect it, forcing them to diagnose the issue (they're getting no information about what is broken) much later, when that is not at all convenient, and most disruptive to what they are doing.

WizardCM commented 4 years ago

I agree with @NightmareJoker2 on this one: silently failing is a bad idea. This may be something we revisit if/when OBS gains the ability to show warnings from sources, but there isn't really a use case for this at the moment (I may be wrong, feel free to correct me).