jean-emmanuel / open-stage-control

Libre and modular OSC / MIDI controller
https://openstagecontrol.ammd.net
GNU General Public License v3.0
702 stars 88 forks source link

[Bug] Default widget values ignored in Safari on iPad #793

Closed erictheise closed 1 year ago

erictheise commented 1 year ago

Default values for widgets load in the Electron app but not consistently in Safari on the iPad. In the attached screenshots of this stripped back session you'll see the Electron app loads a Country Font and the Font size sliders are at a strictly positive value. Not so on Safari/iPad.

erictheise commented 1 year ago

Upload didn't seem to be working for the iPad screenshot.

IMG_0573

jean-emmanuel commented 1 year ago

The issue is not related to iOS and occurs when a 2nd client connects and attempts to sync with the one that's already connected. The way you configured your widgets doesn't work well with the client synchronization mechanism : multiple widgets have the same address and preArgs while they shouldn't be sync'ed. Currently the only solution would be to change the address/preArgs scheme so that it remains unique to each widget and rely on scripting if needed to combine multiple values instead of changing the preArgs dynamically.

Another fix would be to disable osc's client sync which is an option I wanted to add for some time, it should make it in next release as a client option (to be specified in the url per client or in the server's client-options field.

erictheise commented 1 year ago

Thanks for the explanation @jean-emmanuel. I need to send tuples (here it's h, s, l , a values) throughout my application and using preArgs was the only way I could figure to do that when I started. It might even be a carryover from my initial attempts to get this stuff working with Lemur.

I'm sure I'll better understand once I start coding but I'd prefer to have my tuples sent as the widget's value and not use preArgs anyway. Still it sounds as if I'll still need some sort of hack to get to uniqueness.

erictheise commented 1 year ago

Based on your explanation it occurred to me that I could simply launch the Electron app in headless mode; the iPad seems to initialize properly. I'll continue refactoring my setup but since I don't use the desktop controls in performance this looks like the easiest solution for my upcoming gig.

jean-emmanuel commented 1 year ago

Sounds goods :)