camstreamerlib 4.0.0-beta.13 → 4.0.0-beta.15

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 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 textXml = await res.text();
196
- const parser = new fast_xml_parser_1.XMLParser({
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 result.data;
199
+ return json.data;
206
200
  }
207
201
  async getHeaders(proxy = null) {
208
202
  const data = { apiVersion: '1.0', method: 'list' };
@@ -32,8 +32,8 @@ class ProxyClient {
32
32
  'x-target-camera-ip': proxy.ip,
33
33
  'x-target-camera-mdns': proxy.mdnsName,
34
34
  'x-target-camera-port': String(proxy.port),
35
- 'x-target-camera-pass': encodeURIComponent(proxy.pass),
36
- 'x-target-camera-user': encodeURIComponent(proxy.user),
35
+ 'x-target-camera-pass': proxy.pass,
36
+ 'x-target-camera-user': proxy.user,
37
37
  },
38
38
  };
39
39
  }
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 textXml = await res.text();
193
- const parser = new XMLParser({
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 result.data;
196
+ return json.data;
203
197
  }
204
198
  async getHeaders(proxy = null) {
205
199
  const data = { apiVersion: '1.0', method: 'list' };
@@ -29,8 +29,8 @@ export class ProxyClient {
29
29
  'x-target-camera-ip': proxy.ip,
30
30
  'x-target-camera-mdns': proxy.mdnsName,
31
31
  'x-target-camera-port': String(proxy.port),
32
- 'x-target-camera-pass': encodeURIComponent(proxy.pass),
33
- 'x-target-camera-user': encodeURIComponent(proxy.user),
32
+ 'x-target-camera-pass': proxy.pass,
33
+ 'x-target-camera-user': proxy.user,
34
34
  },
35
35
  };
36
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camstreamerlib",
3
- "version": "4.0.0-beta.13",
3
+ "version": "4.0.0-beta.15",
4
4
  "description": "Helper library for CamStreamer ACAP applications.",
5
5
  "prettier": "@camstreamer/prettier-config",
6
6
  "dependencies": {