@capturebridge/sdk 0.24.2 → 0.25.0

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/CHANGELOG.html CHANGED
@@ -1,6 +1,6 @@
1
1
  <html>
2
2
  <head>
3
- <title>CaptureBridge JavaScript SDK v0.24.2 Changelog</title>
3
+ <title>CaptureBridge JavaScript SDK v0.25.0 Changelog</title>
4
4
  <style>
5
5
  body {
6
6
  font-family: sans-serif;
@@ -41,6 +41,22 @@
41
41
  <p>All notable changes to this project will be documented in this file.</p>
42
42
  <p>The format is based on <a href="https://keepachangelog.com/en/1.1.0/">Keep a Changelog</a>,
43
43
  and this project adheres to <a href="https://semver.org/spec/v2.0.0.html">Semantic Versioning</a>.</p>
44
+ <h2><a href="https://www.npmjs.com/package/@capturebridge/sdk/v/0.25.0">0.25.0</a> - 2025-04-30</h2>
45
+ <h3>Changed</h3>
46
+ <ul>
47
+ <li>The SDK no longer sends a <code>rotate=0</code> parameter to capture and stream endpoints
48
+ by default. Therefore you should no longer set a <code>rotate</code> parameter for
49
+ capture and stream related methods unless the user has explicitly requested
50
+ rotation (ensuring their site-specific configuration, if any, is honored.)</li>
51
+ <li>You can inspect an instance&#39;s site-specific configuration at runtime via the
52
+ <code>CaptureBridge.config()</code> method. The <code>defaultPluginRotation</code> config entry will
53
+ list any rotation configurations.</li>
54
+ </ul>
55
+ <h3>Added</h3>
56
+ <ul>
57
+ <li>Added <code>info</code> method to the <code>CanonCamera</code> class.</li>
58
+ <li>Added <code>config</code> method to the <code>CaptureBridge</code> class.</li>
59
+ </ul>
44
60
  <h2><a href="https://www.npmjs.com/package/@capturebridge/sdk/v/0.22.7">0.22.7</a> - 2025-03-13</h2>
45
61
  <h3>Added</h3>
46
62
  <ul>
package/CanonCamera.js CHANGED
@@ -20,6 +20,22 @@ class CanonCamera extends Camera {
20
20
  constructor (baseUrl = BASE_URL) {
21
21
  super('capture_camera_canon', baseUrl)
22
22
  }
23
+
24
+ /**
25
+ * Get detailed information about a specific camera
26
+ *
27
+ * @description Returns detailed information about a camera.
28
+ *
29
+ * @async
30
+ * @method
31
+ * @returns {object} Device info
32
+ * @example
33
+ * const info = await device.info()
34
+ */
35
+ async info (deviceOpt) {
36
+ const device = await this.setupDevice(deviceOpt)
37
+ return device.info()
38
+ }
23
39
  }
24
40
 
25
41
  export default CanonCamera
package/CaptureBridge.js CHANGED
@@ -51,6 +51,22 @@ class CaptureBridge {
51
51
  return await response.json()
52
52
  }
53
53
 
54
+ /**
55
+ * Get instance configuration details
56
+ * @method
57
+ * @async
58
+ * @see {@link https://local.capturebridge.net:9001/doc/#api-Service-GetConfig|API Endpoint (/config)}
59
+ * @returns {object} Instance configuration information.
60
+ * @example
61
+ * const captureBridge = new CaptureBridge()
62
+ * const configInfo = await captureBridge.config()
63
+ * console.log(configInfo)
64
+ */
65
+ async config () {
66
+ const response = await fetch(`${this.baseUrl}/config`)
67
+ return await response.json()
68
+ }
69
+
54
70
  /**
55
71
  * Get all installed plugins
56
72
  * @method
package/Common.js CHANGED
@@ -93,13 +93,13 @@ export const DELETE = {
93
93
  /**
94
94
  * @summary Default options for stream operations
95
95
  * @constant
96
- * @property {number} rotate - Angle, in degrees to rotate the stream. Must be
96
+ * @property {number?} rotate - Angle, in degrees to rotate the stream. Must be
97
97
  * a value from -359 to 359. A value outside of that range, or a 0 will perform
98
98
  * no rotation.
99
99
  * @typedef {object} StreamOptions
100
100
  */
101
101
  export const DEFAULT_STREAM_OPT = {
102
- rotate: 0
102
+ rotate: null
103
103
  }
104
104
 
105
105
  /**
@@ -170,7 +170,7 @@ export const DEFAULT_STREAM_OPT = {
170
170
  * @typedef {object} CaptureOptions
171
171
  */
172
172
  export const DEFAULT_CAPTURE_OPT = {
173
- rotate: 0,
173
+ rotate: null,
174
174
  base64: false,
175
175
  format: null,
176
176
  kind: 'objecturl'
package/Device.js CHANGED
@@ -85,7 +85,7 @@ class Device {
85
85
  this.can('start_feed')
86
86
  this.can('stop_feed')
87
87
  const mergedOpts = Object.assign({}, DEFAULT_STREAM_OPT, streamOpt)
88
- const params = new URLSearchParams(mergedOpts).toString()
88
+ const params = urlParamsToString(mergedOpts)
89
89
  return `${this.baseUrl}/plugin/${this.plugin.id}/device/${this.id}/stream?${params}`
90
90
  }
91
91
 
package/README.md CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  <!--
4
4
  Not until: INF-3147
5
- [SDK Documentation for v0.24.2](https://docs.capturebridge.net/client/sdk/javascript/0.24.2)
6
- [CHANGELOG](https://docs.capturebridge.net/client/sdk/javascript/0.24.2/CHANGELOG.html)
5
+ [SDK Documentation for v0.25.0](https://docs.capturebridge.net/client/sdk/javascript/0.25.0)
6
+ [CHANGELOG](https://docs.capturebridge.net/client/sdk/javascript/0.25.0/CHANGELOG.html)
7
7
  -->
package/Version.js CHANGED
@@ -4,5 +4,5 @@
4
4
  * @constant
5
5
  * @type {string}
6
6
  */
7
- const VERSION = '0.24.2'
7
+ const VERSION = '0.25.0'
8
8
  export default VERSION
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capturebridge/sdk",
3
- "version": "0.24.2",
3
+ "version": "0.25.0",
4
4
  "description": "Capture Bridge JavaScript client SDK",
5
5
  "type": "module",
6
6
  "types": "types.d.ts",