camstreamerlib 4.0.0-beta.13 → 4.0.0-beta.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/VapixAPI.js +3 -9
- package/esm/VapixAPI.js +3 -9
- package/package.json +1 -1
package/cjs/VapixAPI.js
CHANGED
|
@@ -192,17 +192,11 @@ class VapixAPI {
|
|
|
192
192
|
}
|
|
193
193
|
async fetchRemoteDeviceInfo(payload, proxy = null) {
|
|
194
194
|
const res = await this.postJson(proxy, '/axis-cgi/basicdeviceinfo.cgi', payload);
|
|
195
|
-
const
|
|
196
|
-
|
|
197
|
-
ignoreAttributes: false,
|
|
198
|
-
attributeNamePrefix: '',
|
|
199
|
-
allowBooleanAttributes: true,
|
|
200
|
-
});
|
|
201
|
-
const result = parser.parse(textXml);
|
|
202
|
-
if ((0, utils_1.isNullish)(result.body.data)) {
|
|
195
|
+
const json = await res.json();
|
|
196
|
+
if ((0, utils_1.isNullish)(json.data)) {
|
|
203
197
|
throw new errors_1.NoDeviceInfoError();
|
|
204
198
|
}
|
|
205
|
-
return
|
|
199
|
+
return json.data;
|
|
206
200
|
}
|
|
207
201
|
async getHeaders(proxy = null) {
|
|
208
202
|
const data = { apiVersion: '1.0', method: 'list' };
|
package/esm/VapixAPI.js
CHANGED
|
@@ -189,17 +189,11 @@ export class VapixAPI {
|
|
|
189
189
|
}
|
|
190
190
|
async fetchRemoteDeviceInfo(payload, proxy = null) {
|
|
191
191
|
const res = await this.postJson(proxy, '/axis-cgi/basicdeviceinfo.cgi', payload);
|
|
192
|
-
const
|
|
193
|
-
|
|
194
|
-
ignoreAttributes: false,
|
|
195
|
-
attributeNamePrefix: '',
|
|
196
|
-
allowBooleanAttributes: true,
|
|
197
|
-
});
|
|
198
|
-
const result = parser.parse(textXml);
|
|
199
|
-
if (isNullish(result.body.data)) {
|
|
192
|
+
const json = await res.json();
|
|
193
|
+
if (isNullish(json.data)) {
|
|
200
194
|
throw new NoDeviceInfoError();
|
|
201
195
|
}
|
|
202
|
-
return
|
|
196
|
+
return json.data;
|
|
203
197
|
}
|
|
204
198
|
async getHeaders(proxy = null) {
|
|
205
199
|
const data = { apiVersion: '1.0', method: 'list' };
|