webscreens / screen-enumeration

Screen enumeration API explainer
Apache License 2.0
23 stars 4 forks source link

Screen change events? #2

Closed inexorabletash closed 4 years ago

inexorabletash commented 5 years ago

Screens can change:

Should there be events for this, or is that out of scope/non-goal?

Potential inspiration: https://electronjs.org/docs/api/screen

Garbee commented 5 years ago

I'd like to know of some compelling use cases for the screen events before pushing one way or the other. I know what the software my company does currently with them, but that's mostly a work-around due to the complexity in our system.

I don't think I'd ever outright disagree with these being included. However for version 1 I would like a compelling use case before supporting it given the bandwidth to the problem scope.

Garbee commented 5 years ago

Looking through the Chromium Issue comments I saw a reference to https://signage.ninja/ . After peeking around one good use-case did come to me.

Let's say they've developed a menu that normally works across 5 screens. So it's out in production, but the restaurant has some problem. Let's just say, a power chord is pulled by accident. They can use the screen events to know exactly what happened, and re-structure the layout to fit all the content onto the available screen space as best they can. Without having to guess around as to what is happened and infer it from other sources.

With this type of use-case, I could see the events being beneficial to v1 to have.

michaelwasserman commented 4 years ago

I think there are a good number of use cases for events when displays are added/removed or when display properties change; I've included that in the "Future goals" section of the explainer. Polling for changes is not a great situation, so I'll consider bumping this up into "Current goals". Input from others here would be greatly appreciated. Thanks!

nadavsinai commented 4 years ago

Hi, getting the display configuration events would be useful for us too. Currently, we only check if there were any changes in configuration upon application load, but having such events could help us deal with such changes in runtime.

michaelwasserman commented 4 years ago

I made screen change events part of the current explainer's proposal in a recent change, which should satisfy the main request of this issue. Please reopen this or file another issue if you have further feedback, thanks!