mixer / interactive-node

A TypeScript, NodeJS and Browser compatible client for Mixer's interactive 2 Protocol.
MIT License
71 stars 38 forks source link

Give us information about the participant's grid size. #53

Open cactysman opened 7 years ago

cactysman commented 7 years ago
  1. Add a gridsize attribute to participants That would allow us to change the behaviour of the controls or linked applications based on what grid size the participants are on.
  2. Fire a "resize" event when the grid size changes for a participant. The event would basically behave like JavaScript's resize event, just that it's triggered when the displayed grid size (large, medium and small) of the controls change.
ProbablePrime commented 7 years ago

Can you outline the use case here?

cactysman commented 7 years ago

Hmmm I guess some stuff could be accomplished with scenes set up with entirely different buttons per grid size instead, also I don't really have a concrete use case example here.

Basically I had the idea of the resize event and thought it could be useful to people in some way if we had access to that piece of information 🤔

kateract commented 7 years ago

There's not really a need for a resize event, as the positions of the buttons are defined when they are created for all three sizes. Any changes that need to be made should be handled at that point. If you want different controls for the different sizes, I think you should just be able to add a position for only the sizes you want a button to display on. As it is, I think all of the potential use cases for a resize event are covered, at least from a server perspective.

As far as the board sizes, the only real reason that this would be useful is if mixer decides to change the size of the interactive board sometime in the future, which would be a breaking change for a lot of folks if they decide to make them smaller. Barring that, I was able to make my control flow function just by defining the sizes in my own code with a const. I think it might still be a worthy addition at some point though in order to future proof against any changes that might be made to the interactive board sizes in the future.

kateract commented 7 years ago

Is this basically #64 now?

cactysman commented 7 years ago

No. This issue is about getting the current grid size layout a participant is using.

64 is about maintaining layout information internally.