Init WebCG

This commit is contained in:
2026-08-12 14:21:28 +09:00
commit 5c01660f97
170 changed files with 46248 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
// ================== functions alphabetical order ==================================================
const logger = require('./logger.js');
const fs = require('fs');
const path = require('path')
const moment = require('moment');
module.exports = {
webPlayoutController: function (data){
// We pass the data object to be processed by the web renderer
// First dataformat sanity check.
// THIS FORMATS JSON AND SENDS IT FORWARDS in all cases: play, stop, update...
let TEMPLATEDATA = [];
//console.log('Format [' + DataType + '] data.fields coming in before emit', data.fields);
if (data.fields && data.fields.length > 0) {
data.fields.forEach((item,index) => {
let tempObj={};
tempObj[item.field] = item.value;
TEMPLATEDATA.push(tempObj);
});
data.fields=TEMPLATEDATA;
}
// console.log('webPlayoutController data.fields going out for emit', data);
io.emit('SPXMessage2Client', data);
}
} // end of exports PlayoutWEB.<functionName>