client-options: add client-sync option to allow disabling client synchronization
This commit is contained in:
parent
5df9c436b2
commit
1eec9833f0
5 changed files with 14 additions and 2 deletions
|
|
@ -7,7 +7,7 @@
|
|||
- canvas: iOS: trigger `onTouch` when `event.force`, `event.altitudeAngle` or `event.azimuthAngle` updates
|
||||
- knob: add `snap-alt` mode (snap mode that allows jumping between range.min and range.max)
|
||||
- all: add `borderRadius` property
|
||||
|
||||
|
||||
- scripting
|
||||
- add `updateCanvas()` function (forces a canvas widget to redraw)
|
||||
|
||||
|
|
@ -17,6 +17,9 @@
|
|||
- midi
|
||||
- on Mac, name virtual ports after the device name to avoid confusion
|
||||
|
||||
- server
|
||||
- client-options: add `client-sync` option to allow disabling client synchronization
|
||||
|
||||
## 1.17.0
|
||||
|
||||
- bug fixes
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ Client options can be set either with the server's `--client-options` option, or
|
|||
| id | string | *random_id* | client's unique id (use with caution: two clients should never have the same id) |
|
||||
| usePercents | 1 / 0 | 0 | sets the editor's "relative units" option |
|
||||
| noFocus | 1 / 0 | 0 | (built-in client only) prevent the client window from taking focus unless a text input or a dropdown is clicked |
|
||||
| clientSync | 1 / 0 | 1 | set to 0 to prevent the client from syncing with other clients |
|
||||
|
||||
|
||||
Example:
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ document.documentElement.style.setProperty('font-size', PXSCALE + 'px')
|
|||
|
||||
window.DOUBLE_TAP_TIME = ENV.doubletap ? parseInt(ENV.doubletap) : 375
|
||||
|
||||
window.CLIENT_SYNC = parseInt(ENV.clientSync) === 0 ? 0 : 1
|
||||
|
||||
window.JSON.parseFlex = require('json5').parse
|
||||
|
||||
|
|
|
|||
|
|
@ -58,6 +58,9 @@ module.exports = {
|
|||
},
|
||||
|
||||
stateSend:function(){
|
||||
|
||||
if (CLIENT_SYNC === 0) return
|
||||
|
||||
notifications.add({
|
||||
icon: 'wifi',
|
||||
message: locales('loading_newclient')
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ var Osc = class Osc extends EventEmitter {
|
|||
|
||||
} else {
|
||||
|
||||
if (CLIENT_SYNC === 0) data.noSync = 1
|
||||
|
||||
ipc.send('sendOsc', data)
|
||||
|
||||
}
|
||||
|
|
@ -35,7 +37,7 @@ var Osc = class Osc extends EventEmitter {
|
|||
|
||||
sync(data) {
|
||||
|
||||
ipc.send('syncOsc', data)
|
||||
if (CLIENT_SYNC) ipc.send('syncOsc', data)
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -65,6 +67,8 @@ var Osc = class Osc extends EventEmitter {
|
|||
|
||||
receive(data){
|
||||
|
||||
if (data._rawTarget && CLIENT_SYNC === 0) return
|
||||
|
||||
if (typeof this.remoteControl.exists === 'function' && this.remoteControl.exists(data.address)) this.remoteControl.exec(data.address, data.args)
|
||||
|
||||
var [widgets, restArgs] = widgetManager.getWidgetByAddressAndArgs(data.address, data.args)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue