cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
503
Views
0
Helpful
0
Replies

Webex Codec Plus CE 9.7.1 macro problem

vstjie123
Level 1
Level 1

Hoping somebody may be able to provide some insight to a macro issue we've been facing with the Webex Codec Plus series.

 

We have two output display and basically want to enforce the following:

1. If content is being shared locally or in a call, show it on the left display (Output 1), and move camera to the right screen (Output 2)

2. If content is being shared locally and in a call at the same time, show the content on both screens (no camera necessary)

 

It seems the macro editor was really well suited for this, and we tried a couple of solutions. Unfortunately, both approaches have edge cases preventing them from working how we want.

 

1. The first attempt tried was to just "flip" the MonitorRole on the two output connectors when we detected any form of content being shared. This works in most basic scenarios well, but when we have two content sources in a call the far side's camera takes priority and pushes a content source into PIP. So the flip does not always work.... Is there a setting somewhere or an API call we can make to reliably force the content streams (whether local or in call) to have priority over camera in these scenarios, maybe?

const xapi = require('xapi');

var vcPresenting = false;
var presentationPreviewIDs = [];

function eventHandle(e) {
  var index = -1;
if (e.PresentationStarted) { vcPresenting = true; } else if (e.PresentationPreviewStarted) { presentationPreviewIDs.push(e.PresentationPreviewStarted.Instance); } else if (e.PresentationStopped) { vcPresenting = false; } else if (e.PresentationPreviewStopped) { index = presentationPreviewIDs.indexOf(e.PresentationPreviewStopped.Instance); if (index !== -1) presentationPreviewIDs.splice(index, 1); } if(vcPresenting === true || presentationPreviewIDs.length > 0){ xapi.config.set('Video Output Connector 1 MonitorRole', 'Second'); xapi.config.set('Video Output Connector 2 MonitorRole', 'First'); } else { xapi.config.set('Video Output Connector 1 MonitorRole', 'First'); xapi.config.set('Video Output Connector 2 MonitorRole', 'Second'); } } xapi.event.on('', eventHandle);

2. We next tried to explicitly capture the sourceIDs involved and assign them with the Video Matrix Assign command. This works great when just doing local testing, but we are unsure how to accurately grab the sourceID for receiving content. Also, we have observed cases where it seems like the correct sourceID for this command just does not exist. E.g., SSH into the codec and during a call we can manually run the xcommand version of this API function. We've seen in calls with received content where we can only call Video Matrix Assign with sourceIDs 1-3 (0 and 4+ throw an error as non-existent), yet none of them are the content channel we're looking for. Is there a better way to identify the exact sourceIDs involved and assign them to our output displays during a call? Maybe we should be using a different API call entirely instead of Video Matrix Assign?

 

const xapi = require('xapi');

var localContent = 0;
var vcContent = 0;
var localId = 0;

function presentationMode() {
  console.log('localContent:',localContent,', vcContent:',vcContent);
  if(vcContent > 0 && localContent === 0){
    console.log('VC Content source');
    xapi.command('Video Matrix Assign', { Output: 1, SourceId: vcContent});
    xapi.command('Video Matrix Assign', { Output: 2, SourceId: 1});
  } else if (vcContent === 0 && localContent > 0) {
    console.log('Local Content source');
    xapi.command('Video Matrix Assign', { Output: 1, SourceId: localContent});
    xapi.command('Video Matrix Assign', { Output: 2, SourceId: 1});
  } else if (vcContent > 0 && localContent > 0 ) {
    console.log('Dual Content sources');
    xapi.command('Video Matrix Assign', { Output: 1, SourceId: localContent});
    xapi.command('Video Matrix Assign', { Output: 2, SourceId: vcContent});
  } else {
    console.log('No content sources. Assigning output 1 -> 1 && 2 -> 2');
    xapi.command('Video Matrix Assign', { Output: 1, SourceId: 1});
    xapi.command('Video Matrix Assign', { Output: 2, SourceId: 2});
  }
}

function checkStatus(status) {
  console.log('status change', status);

  if (status.Mode) {
    if (status.Mode === 'Receiving') {
      console.log('Receiving content, SourceId:3?')
      vcContent = 3; // Receiving content will not always be 3. Unsure how to identify correct value
    }
    else if (status.Mode === 'Off') {
      console.log('vc content off');
      vcContent = 0;
    }
  }
  else if (status.LocalInstance) {
    if (status.LocalInstance[0].SendingMode === 'LocalOnly') {
      console.log('LocalOnly on Sourceid:',status.LocalInstance[0].Source);
      localContent = status.LocalInstance[0].Source;
      localId = status.LocalInstance[0].id;
    }
    if (status.LocalInstance[0].SendingMode === 'LocalRemote') {
      console.log('LocalRemote on SourceId:',status.LocalInstance[0].Source);
      vcContent = status.LocalInstance[0].Source;
    }
    if (status.LocalInstance[0].ghost === 'True' && status.LocalInstance[0].id == localId) {
      console.log('No local content');
      localContent = 0;
      localId = 0;
    }
  }
  presentationMode();
}

// Event listener for all presentation mode changes
xapi.status.on('Conference Presentation', checkStatus);

 

Any thoughts on this?

 

Thank you!

0 Replies 0