07-03-2020 11:27 AM
I'm trying to composite 2 different camera inputs, and have the configuration remain 'sticky'....stays that way no matter what else you do on the codec.
The command 'xCommand Video Input SetMainVideoSource ConnectorId:1 ConnectorId:2 Layout:Equal' in the API seems to do what is required, but it is not 'sticky'. If someone wants to use the PTZ controls for one of the cameras, for example, it goes back to a single camera view.
So to get around that, I was trying to create a command button on the Touch 10 that would re-initiate the composite view.
The same command just doesn't seem to work when sent from a macro. It has to be reformatted for the requirements of a macro, and that seems to get me to this:
xapi.command('Video Input SetMainVideoSource', { ConnectorId: '1', ConnectorId: '2', Layout: 'Equal'} );
But this doesn't work. Just sets main video to Connector 1, and completely ignores Connector 2. If I reverse the order of the connectors in the command, then it does the opposite. It's like the macro processor doesn't understand the command the same way that the API does.
There must be a way around this, to get source compositing to work permanently. Can anyone around here lend a hand? I'm sure this can't be very complicated....just me. I'm trying to format the command correctly so that it will be accepted as a macro by the codec. Thanks!
Solved! Go to Solution.
07-08-2020 02:40 PM
I was able to find out the syntax of the command on my own:
xapi.command('Video Input SetMainVideoSource', { ConnectorId: [1, 2], Layout: 'Equal' } );
07-08-2020 02:40 PM
I was able to find out the syntax of the command on my own:
xapi.command('Video Input SetMainVideoSource', { ConnectorId: [1, 2], Layout: 'Equal' } );
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide