On save, the JSON file reloads to a different tab (first "session" tab)

When I save the changes of a JSON file, I'd like the automatic reload on connected clients to not switch to the first tab. Is this possible?

I use a Windows tablet and an Android phone as connected clients, while I'm doing the editing (of the JSON file) on the device that runs the OSC server (Macbook). It's a bit frustrating to manually go to the closed (switched-off) tab after each save and on both clients.

If I remember correctly you have set the tab container’s bypass property to true, that’s what prevents the other clients to sync to the same tab.

That’s correct. I did set the tab container’s bypass property to true!
But I wasn’t clear enough. Sorry! Let me explain again (below).

My tablet is set to display the first tab and my phone is set to display the fourth tab. When I save the changes made in the OSC editor, the phone and the tablet both load the new json file. Now, while I like having the tablet display the first tab, I want the phone always to display the 4th tab. It would also be nice to have the phone (or any other client) open the json file at a given tab.

There’s currently no way to do that, what could be done in the future would be to expose some environment variables in scripts (url, device informations, screen size…) to let users use them as conditionals for use cases like yours.

2 Likes

Hi, dear topic! After a year (since it's the... future!), we -- aaa -- meet again! :stuck_out_tongue:
My question for the time being (and related to the topic) is this:
Can v1.9.3 (as oposed to v0) detect the device's IP address of the device that runs the O-S-C client and, based on this, automatically open a different session file (other than the one that's set in the configuration form of the server)?

Thank you!

Yes, here is a minimal example (leave the server's load option empty):

var sessions = {
    '127.0.0.1': 'path/to/a.json',
    '192.168.0.10': 'path/to/b.json'
}

app.on('open', (data, client)=>{

    console.log('Client connected: ' + client.address)

    if (sessions[client.address]) {
        receive('/SESSION/OPEN', sessions[client.address], {clientId: client.id})
    }
    
})

References:

1 Like

Sorry for reviving the topic (again), but I just couldn't let it rest in peace. :grin:

Here's my new question:

Is there a way to open a different session by using a different address?
Something like: 192.168.43.2:8080/a.json

The reason I'm asking:

I'd like to make shortcuts on the desktop for different session files.
Shortcut 1, to open (on the main monitor) the session file named A.json
Shortcut 2, to open (on the secondary monitor) the session file named B.json

Thank you!

hi

maybe i don't catch what you want :slight_smile:

open-stage-control --no-gui --load path/to/your/session.json --theme path/to/your/theme.css

and this post maybe :Auto start (play) session at startup - #7 by Greenman

1 Like

(read linked post and the last one in the thread)

1 Like