Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service Integration and UX Improvements (Work in progress) #1579

Closed
wants to merge 57 commits into from

Conversation

jp9000
Copy link
Member

@jp9000 jp9000 commented Dec 15, 2018

This pull request:

  • Improves the user experience for both the auto-configuration dialog and the stream page, removing the redundant "service type" option, and consolidates all services (including "custom") in to a single service-selection drop down. In addition, instead of selecting "Show all" as a checkbox, it is now present in the drop-down at the bottom.
  • Allows the ability to log in to services directly (at least ones that implement direct-login) instead of manually having to look up their stream key for the service. Typically this is done via OAuth using a browser panel window. Note that this is optional; the user can still enter a stream key if they wish it for stream key-based services. If the browser plugin is not present, only stream key entry will be present.
  • If the user chooses to log in to a service, that service can add custom user interface specific to that service. For example, at the moment I've implemented it so that for twitch, the twitch chat window will pop up as a dockable window, and hopefully I will implement something to allow updating the stream game/title on the spot. Eventually we'll have the same for other major services.

I am making this pull request for the purposes of discussion while I work on the feature. All these things are subject to change, and feel free to discuss your opinions or what you would like to see. Certain things are not finalized -- some of the code still needs refactoring as of this writing (there's still a fair amount of code duplication at the moment). There are also some localization strings that have not been added.

A lot of these changes are also the result of a lot of R&D regarding utilizing CEF not just for the browser source, but also for optional user interface. I finally have the browser working as actual optional in-program widgets, so this is a step forward towards relatively easy augmentation of the user interface in cases where it makes sense (like service integration).

@SuslikV
Copy link
Contributor

SuslikV commented Dec 15, 2018

Because of such huge change in OBS Studio is there any known security risks introduced by CEF integration?

@SuslikV
Copy link
Contributor

SuslikV commented Dec 15, 2018

"Connect Account (optional)" - I read this like: I can connect to as many accounts as I wish simultaneously. Maybe "Bind Account (optional)" is better naming of the option?

@jp9000
Copy link
Member Author

jp9000 commented Dec 16, 2018

Pages that this uses may as well be considered whitelisted. OBS is not acting as a web browser, these are only specific pages we choose acting as UI elements. Let's say they open a link in a chat window -- any external link they choose in say their chat window get redirected to their system browser, and not OBS itself.

@jhobz
Copy link

jhobz commented Dec 16, 2018

This is great! In addition to the identified usefulness of being able to update game/title directly from OBS, I think a big win would also be having a hotkey that generates a Stream Marker for use in highlighting.

@Scrxtchy
Copy link
Contributor

This is great! In addition to the identified usefulness of being able to update game/title directly from OBS, I think a big win would also be having a hotkey that generates a Stream Marker for use in highlighting.

Hmm, If the oauth tokens were easily picked up from API bindings, these could more easily people to add additional functionality like stream markers. You could do it right now with some scripting, but you'd need an oauth key handy, they aren't hard to get, it's just not going to be as pleasant compared to it being handled by OBS studio

@jp9000
Copy link
Member Author

jp9000 commented Dec 17, 2018

I would love to implement anything like that which could be useful. It'd be nice if Twitch dashboard elements could be used as individual popouts, that way we wouldn't necessarily have to implement that ourselves, and Twitch could customize them however they please.

As for the normal API, I'm not sure how much the Twitch API exposes for features like that, I know they switched to GraphQL for their recent API, if it's available in the current OAuth standard then I'd invite people to implement it after merging.

@Scrxtchy
Copy link
Contributor

The current situation with Twitch's API is kinda bonkers, Since there are a number of endpoints that aren't implemented on the new API, and even in production they have to resolve to using the old API (v5). Other than that, anything that does use the new API is a lot easier to manage.

For example, updating your current game still points to using Kraken (v5), this is also used on the mobile version of twitch, therefore this sounds like a chore 😒

@Scrxtchy
Copy link
Contributor

The FFZ control centre doesn't work.
It opens a tab within the desktop browser, where I do not use the extension
image

@jp9000
Copy link
Member Author

jp9000 commented Dec 20, 2018

The browser panel code is programmed not to allow popup windows, so that's not entirely surprising. I'm not sure how I feel about having popup windows within the program.

@Scrxtchy
Copy link
Contributor

CEF is programmed not to allow popup windows, so that's not entirely surprising. I'm not sure how I feel about having popup windows within the program.

It's a tough one because I don't think everyone as well wants the default configurations that come with these userscripts. For example, the recolouring of usernames
image

@jp9000
Copy link
Member Author

jp9000 commented Dec 20, 2018

Hm, I'll see what I can do.

@Scrxtchy
Copy link
Contributor

Well, I could consider adding a settings pane for integration. Could allow users to disable the userscripts for running at all, as well as opening their settings. Only thing is I know you can easily open FFZ's settings from adding ?ffz-settings to your URL (https://github.com/FrankerFaceZ/FrankerFaceZ/blob/e3ab5d63a31c5a904ea05a8848cf9397ede82738/src/sites/twitch-twilight/index.js#L93), should work as long as the script is loaded. But BTTV is another story, they also have an option to open settings from chat, which displays their inline settings, but it doesn't work in the frames (https://github.com/night/BetterTTV/blob/8d5dda3951ae96fc9a97d25a8b5ca70432ae4ce6/src/modules/chat_settings/index.js#L45), could probably nicely ask @night to implement a param check into the extension (similar to ffz) to automattically open the bttv settings screen, as OBS should be able to just load these webpages in their own QWidget, as long as localStorage is shared between instances

@Scrxtchy
Copy link
Contributor

Scrxtchy commented Dec 28, 2018

Another addition to the twitch service integration is to easily run a stream to twitch inspector
image

Currently, you are unable to access this if you have the account connected, due to the streamkey input being no longer used. I guess that this also restricts streaming to someone else's page through your own account
image

@WizardCM
Copy link
Member

The Auto-config wizard in the Tools menu already uses the bandwidth test mode. That's a good point though - I'd be curious what kind of integration https://inspector.twitch.tv/ supports. It'd allow us to show a streaming report using Twitch's own data.

@Scrxtchy
Copy link
Contributor

I use it alongside OBS's stats window to do testing in a live environment. Means I'm outputting to a twitch ingest, but not broadcasting to a channel. Helps for debugging

@ejm
Copy link

ejm commented Dec 30, 2018

First off, I'm really excited to see this become part of OBS. Secondly, will it be possible to support services which could have multiple stream keys? For instance, YouTube can have multiple liveBroadcast objects, each with their own "bound" liveStream, where you would find a stream key. Some more info on that is here but being able to choose between different broadcasts on an account would be amazing. Right now the osb-service API only seems to support get_url and get_key, implying a single key per service.

The "Custom" service has been moved, and is now an item called "Custom"
in the "Services" combo box.  This simplifies the stream page of
auto-configuration and removes an unnecessary widget.  Overall a minor
but nice slimline/improvement on user experience.
Currently, browser panel is only supported on windows.  So rather than
have to check for _WIN32 in the code everywhere, just move the WIN32
check to cmake, that way we don't have to have _WIN32 checks in the code
everywhere the browser panel code is used, and do not have to remove a
whole bunch of unnecessary _WIN32 #ifdefs for other operating systems
when browser panel support is added for them.
Allows specifying a timeout for the operation.
Allows specifying extra headers.
@jp9000
Copy link
Member Author

jp9000 commented Feb 8, 2019

Cleaned up commits and merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants