Detect if running in Max or Live from js?

patrickkidd's icon

I am trying to workaround some behavioral nuances (*cough* crashes *cough*) between running/saving a device in Max and in Live, and could workaround them if I were able to detect which environment my js object was running in.

Thoughts? Thanks!

Diemo Schwarz's icon

Stumbled upon these "nuances", too, using

new SnapshotAPI(jsarguments[1]);

Live crashes.

Did you find out how to find out whether running in Max or Live?

We shouldn't have to work around glaring bugs in Max, however, write to support and they should fix it.

tyler mazaika's icon

Here's one way...

var api = new LiveAPI(null, "live_set")
if ( ! api || ! api.id ) {
    // You're in Max standalone
}