Creating buttons to change source in placers

Hi all,

Recently I watched Achim’s demonstration on automation and it was an interesting discovery to see Mimolive change lower 3rd names based on the source selected in Zoom sources.

I would like to create a button that can change sources within a placer. I found the “Copy URL to change Video Source” command and it works when pasted in Safari.

However, it doesn’t work in an automation layer with the following command:

Automation Variant 1
httpRequest(“http://127.0.0.1:8989/api/v1/documents/49047412/layers/7B1FDB36-3224-4002-8A15-FDBFADD44EA9/variants/B369A76F-C2E4-4654-941B-9C568E157680?include=data.attributes.input-values&fields[input-values]=tvIn_VideoSourceAImage&update={“input-values”:{“tvIn_VideoSourceAImage”:“TVDeviceVideoSource-1”}}”)

Automation Variant 2
httpRequest(“http://127.0.0.1:8989/api/v1/documents/49047412/layers/7B1FDB36-3224-4002-8A15-FDBFADD44EA9/variants/B369A76F-C2E4-4654-941B-9C568E157680?include=data.attributes.input-values&fields[input-values]=tvIn_VideoSourceAImage&update={“input-values”:{“tvIn_VideoSourceAImage”:“TVDeviceVideoSource-10”}}”)

The script says, “On Live: Script is OK” but nothing changes.

What am I doing wrong? Thanks!

Looks like there might be “curly quotes” in the code. Does it work if you replace them with plain quotes?

Hi Oliver, pasting the code here formatted it differently from what was copied from Mimolive. Attaching a screenshot for reference.

httpRequest("http://127.0.0.1:8989/api/v1/documents/49047412/layers/3774422D-51DC-472C-B52C-45753475F11C/variants/D10F5FF4-7570-4CF2-BC65-FD0D5525BF2F?include=data.attributes.input-values&fields[input-values]=tvIn_VideoSourceAImage&update=%7B%22input-values%22:%7B%22tvIn_VideoSourceAImage%22:%22TVDeviceVideoSource-1%22%7D%7D")

httpRequest("http://127.0.0.1:8989/api/v1/documents/49047412/layers/3774422D-51DC-472C-B52C-45753475F11C/variants/D10F5FF4-7570-4CF2-BC65-FD0D5525BF2F?include=data.attributes.input-values&fields[input-values]=tvIn_VideoSourceAImage&update=%7B%22input-values%22:%7B%22tvIn_VideoSourceAImage%22:%22TVDeviceVideoSource-10%22%7D%7D")

hmm… strangely it works now. :smile:
I have now idea what was different after lunch!

1 Like

Hi @Gabriel_Ng Glad to hear that it works now. I don’t think Lunch was the cause, but maybe waiting helped because the script wasn’t updated right away. We’ll check if this could be the case.

@Gabriel_Ng To help out the Boinx team I’d be willing to do a detailed study with and without lunch, and with various lunch choices to more fully debug this!

2 Likes