Hello Petar,
We found the issue of why some Mobile Servers not connecting (it appears that the Mobile Servers don’t work on systems with Windows 7).
Regarding the issue of multiple Mobile Servers:
We have the following IP Addresses in the XPMobileSDK.library.js and XPMobileSDK.js files, but we can only set one IP-Address, because the .js files are not dynamic.
QUESTION: Do you know of a mechanism that we can use for multiple Mobile Servers simultaneously (because the Mobile SDK files below are not dynamic)?
We are using the Central API in Professional (non+) 2019 R1, so I’m not sure how the suggested round-robin method (https://doc.developer.milestonesys.com/html/reference/protocols/registrationservice.html) would work?
//Adapter.js file:
const axios = require(‘axios’);
//= =======================================
// Connection Route
//= =======================================
exports.Connection = function (req, res, next) {
console.log(‘connecting…’);
var route = req.body.route;
var data = req.body.content;//‘<?xml version="1.0" encoding="utf-8"?><Communication xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=“http://www.w3.org/2001/XMLSchema”>RequestConnect\n’
var responseType = req.body.responseType;
var contentType = req.body.contentType;
//var serverIP = “http://127.0.0.1:8081/”; //localhost
//var serverIP = “http://192.168.1.103:8081/”; //TEST1 //TEST1 (this works)
//var serverIP = “http://192.168.1.107:8081/”; //AMS (this works)
var serverIP = “http://192.168.1.145:8081/”; //DESKTOP-4MA36CC (Mobile Server on Surveillance Server; this works)
console.log(serverIP + route)
axios.post(serverIP + route,
data,
{
responseType: responseType,
headers:{
'Content-Type': contentType
}
}).then(response => {
if(typeof data === 'string' && data.search('Upload') > 0){
console.log('VideoPushResponse: ', response.data)
}
let result = response.data;
console.log(result)
res.header('Access-Control-Allow-Origin', '\*');
res.header('Access-Control-Allow-Methods', 'PUT, GET, POST, DELETE, OPTIONS');
res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept, Authorization, Access-Control-Allow-Credentials');
res.header('Content-Type', 'text/xml; charset=utf-8')
res.status(200).send(result);
}).catch(error => {
console.log(error);
});
};
---------------------------------------------------------------
//XPMobileSDK.library.js
import $ from ‘jquery’
import rootReducer from ‘../redux’
let XPMobileSDK = {
library: {},
interfaces: {},
};
let XPMobileSDKSettings = {
fileName: ‘XPMobileSDK.js’,
clientType: ‘WebClient’,
communicationChanel: ‘XProtectMobile/Communication’,
videoChanel: ‘/XProtectMobile/Video’,
audioChannel: ‘/XProtectMobile/Audio’,
//MobileServerURL: ‘http://127.0.0.1:8081’, //TEST1 (this works?)
//MobileServerURL: ‘http://192.168.1.103:8081’, //TEST1 (this works)
//MobileServerURL: ‘http://192.168.1.107:8081’, //AMS (this works)
MobileServerURL: ‘http://192.168.1.145:8081’, //DESKTOP-4MA36CC (Mobile Server on Surveillance Server; this works)
defaultEncryptionPadding: ‘Iso10126’,
primeLength: 1024,
videoConnectionTimeout: 20000,
resamplingFactor: 1 / 1000000,
supportsMultiThreaded: false,
supportsCarousels: false,
supportsFootages: false,
supportsCHAP: true,
SupportsAudioIn: true,
SupportsAudioOut: false,
AudioCompressionLevel: 99,
AudioCompressionLevelAudioAPI: 41,
};
. . . . . . <<>>
Thanks, Daniel