@capturebridge/sdk 0.7.0 → 0.8.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/Camera.js +63 -68
- package/CanonCamera.js +25 -25
- package/CaptureBridge.js +160 -162
- package/CapturePlugin.js +68 -79
- package/Common.js +182 -98
- package/Device.js +547 -451
- package/ICAO.js +70 -70
- package/IFace.js +278 -274
- package/Logs.js +129 -129
- package/MockCamera.js +17 -10
- package/Plugin.js +299 -298
- package/Scanner.js +55 -64
- package/SignatureTablet.js +108 -109
- package/SignatureTabletWidgets.js +164 -153
- package/StreamingCapturePlugin.js +129 -121
- package/TopazSigGem.js +25 -25
- package/Version.js +8 -0
- package/WindowsScanner.js +25 -0
- package/examples/canon.html +66 -0
- package/examples/canon_getframe.html +68 -0
- package/examples/canon_lan.html +68 -0
- package/examples/canon_minimal.html +37 -0
- package/examples/mockcamera.html +61 -0
- package/examples/mockcamera_getframe.html +63 -0
- package/examples/mockcamera_minimal.html +31 -0
- package/examples/windows_scanner_minimal.html +32 -0
- package/package.json +2 -2
|
@@ -1,153 +1,164 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
*
|
|
36
|
-
* @
|
|
37
|
-
*
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
*
|
|
134
|
-
* @
|
|
135
|
-
*
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @module SignatureTabletWidgets
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { blobToBase64 } from './Common.js'
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* DisplayWidget
|
|
9
|
+
* @classdesc Represents a widget that can be displayed at some x and y coordinates
|
|
10
|
+
* @see {@link TextButton}
|
|
11
|
+
* @see {@link Text}
|
|
12
|
+
* @see {@link Image}
|
|
13
|
+
*/
|
|
14
|
+
export class DisplayWidget {
|
|
15
|
+
x
|
|
16
|
+
y
|
|
17
|
+
constructor (x, y) {
|
|
18
|
+
this.x = x
|
|
19
|
+
this.y = y
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* TextButton
|
|
25
|
+
* @classdesc A button for displaying clickable text on a tablet
|
|
26
|
+
* @extends DisplayWidget
|
|
27
|
+
* @see {@link SignatureTablet}
|
|
28
|
+
*/
|
|
29
|
+
export class TextButton extends DisplayWidget {
|
|
30
|
+
text
|
|
31
|
+
fontFace
|
|
32
|
+
fontSize
|
|
33
|
+
id
|
|
34
|
+
/**
|
|
35
|
+
* Instantiate a Tablet Text Button
|
|
36
|
+
* @constructor
|
|
37
|
+
* @param {string} text - Text to display on the button
|
|
38
|
+
* @param {number} x - X position to draw the button
|
|
39
|
+
* @param {number} y - Y position to draw the button
|
|
40
|
+
* @param {text} [id] - ID of the button that will be returned when it is
|
|
41
|
+
* clicked. If not set one will attempt to be constructed from the button
|
|
42
|
+
* text but there is no guarantee it will be unique.
|
|
43
|
+
* @param {string} [fontFace] - Font face for the text on the button.
|
|
44
|
+
* Defaults to 'Arial'
|
|
45
|
+
* @param {number} [fontSize] - Size of the font for the text on the button.
|
|
46
|
+
* Defaults to 40.
|
|
47
|
+
* @example
|
|
48
|
+
* const new TextButton("OK", 20, 200)
|
|
49
|
+
*/
|
|
50
|
+
constructor (text, x, y, id, fontFace = 'Arial', fontSize = 40) {
|
|
51
|
+
super(x, y)
|
|
52
|
+
this.text = text
|
|
53
|
+
this.fontFace = fontFace
|
|
54
|
+
this.fontSize = fontSize
|
|
55
|
+
if (id) {
|
|
56
|
+
this.id = id
|
|
57
|
+
} else {
|
|
58
|
+
this.id = text.length > 16 ? text.slice(0, 16) : text
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
toJSON () {
|
|
63
|
+
return {
|
|
64
|
+
type: 'button',
|
|
65
|
+
text: this.text,
|
|
66
|
+
font_face: this.fontFace,
|
|
67
|
+
font_size: this.fontSize,
|
|
68
|
+
x: this.x,
|
|
69
|
+
y: this.y,
|
|
70
|
+
id: this.id
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Text
|
|
77
|
+
* @classdesc Text to be displayed on a tablet
|
|
78
|
+
* @extends DisplayWidget
|
|
79
|
+
* @see {@link SignatureTablet}
|
|
80
|
+
*/
|
|
81
|
+
export class Text extends DisplayWidget {
|
|
82
|
+
text
|
|
83
|
+
fontFace
|
|
84
|
+
fontSize
|
|
85
|
+
/**
|
|
86
|
+
* Instantiate a Text object
|
|
87
|
+
* @constructor
|
|
88
|
+
* @param {string} text - Text to display on the button
|
|
89
|
+
* @param {number} x - X position to draw the button
|
|
90
|
+
* @param {number} y - Y position to draw the button
|
|
91
|
+
* @param {string} [fontFace] - Font face for the text on the button.
|
|
92
|
+
* Defaults to 'Arial'
|
|
93
|
+
* @param {number} [fontSize] - Size of the font for the text on the button.
|
|
94
|
+
* Defaults to 40.
|
|
95
|
+
* @example
|
|
96
|
+
* const new Text("Do you agree?", 20, 200)
|
|
97
|
+
*/
|
|
98
|
+
constructor (text, x, y, fontFace = 'Arial', fontSize = 40) {
|
|
99
|
+
super(x, y)
|
|
100
|
+
this.text = text
|
|
101
|
+
this.fontFace = fontFace
|
|
102
|
+
this.fontSize = fontSize
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
toJSON () {
|
|
106
|
+
return {
|
|
107
|
+
type: 'text',
|
|
108
|
+
text: this.text,
|
|
109
|
+
font_face: this.fontFace,
|
|
110
|
+
font_size: this.fontSize,
|
|
111
|
+
x: this.x,
|
|
112
|
+
y: this.y
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Image
|
|
119
|
+
* @classdesc Image to be displayed on a tablet
|
|
120
|
+
* @extends DisplayWidget
|
|
121
|
+
* @see {@link SignatureTablet}
|
|
122
|
+
*/
|
|
123
|
+
export class Image extends DisplayWidget {
|
|
124
|
+
url
|
|
125
|
+
imageData
|
|
126
|
+
delay
|
|
127
|
+
/**
|
|
128
|
+
* Instantiate an Image object
|
|
129
|
+
* @constructor
|
|
130
|
+
* @param {string} url - URL of the image.
|
|
131
|
+
* @param {number} [x] - X position to draw the button
|
|
132
|
+
* @param {number} [y] - Y position to draw the button
|
|
133
|
+
* @param {number} [delay] - Milliseconds to sleep after displaying the image
|
|
134
|
+
* @example
|
|
135
|
+
* const new Image("/img/logo.tif", 20, 200)
|
|
136
|
+
*/
|
|
137
|
+
constructor (url, x = 0, y = 0, delay = 0) {
|
|
138
|
+
super(x, y)
|
|
139
|
+
this.url = url
|
|
140
|
+
this.delay = delay
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Fetch the image data and base64 encode it
|
|
145
|
+
* @async
|
|
146
|
+
* @example
|
|
147
|
+
* const new Image("/img/logo.tif", 20, 200)
|
|
148
|
+
*/
|
|
149
|
+
async data () {
|
|
150
|
+
const response = await fetch(this.url)
|
|
151
|
+
const blob = await response.blob()
|
|
152
|
+
this.imageData = await blobToBase64(blob)
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
toJSON () {
|
|
156
|
+
return {
|
|
157
|
+
type: 'image',
|
|
158
|
+
data: this.imageData,
|
|
159
|
+
delay: this.delay,
|
|
160
|
+
x: this.x,
|
|
161
|
+
y: this.y
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
@@ -1,121 +1,129 @@
|
|
|
1
|
-
import CapturePlugin from './CapturePlugin.js'
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* @
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* @
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* @
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* {@link
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
case '
|
|
93
|
-
return
|
|
94
|
-
case '
|
|
95
|
-
return await device.
|
|
96
|
-
case '
|
|
97
|
-
return
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
1
|
+
import CapturePlugin from './CapturePlugin.js'
|
|
2
|
+
import {
|
|
3
|
+
BASE_URL,
|
|
4
|
+
DATAURL_JPEG,
|
|
5
|
+
blobToBuffer,
|
|
6
|
+
DEFAULT_CAPTURE_OPT,
|
|
7
|
+
DEPRECATION_01
|
|
8
|
+
} from './Common.js'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* StreamingCapturePlugin
|
|
12
|
+
* @extends CapturePlugin
|
|
13
|
+
* @classdesc Class for invoking streaming-related methods
|
|
14
|
+
*/
|
|
15
|
+
class StreamingCapturePlugin extends CapturePlugin {
|
|
16
|
+
constructor (plugin, baseUrl = BASE_URL) {
|
|
17
|
+
super(plugin, baseUrl)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Get the CapturePlugin's stream endpoint URL.
|
|
22
|
+
*
|
|
23
|
+
* @description The URL returned from this endpoint can be attached to an
|
|
24
|
+
* img tag's src attribute. The camera's live stream will be started and
|
|
25
|
+
* begin streaming to the img tag as a
|
|
26
|
+
* {@link https://en.wikipedia.org/wiki/Motion_JPEG|Motion JPEG} stream.
|
|
27
|
+
* If the src is changed, the img removed from the DOM, or client disconnected
|
|
28
|
+
* for any reason, the live feed will automatically be stopped.
|
|
29
|
+
*
|
|
30
|
+
* @param {string|object} [deviceOpt] - Get the stream URL from either a
|
|
31
|
+
* specific Device ID or a Device Object. The default is the first available
|
|
32
|
+
* device.
|
|
33
|
+
*
|
|
34
|
+
* @async
|
|
35
|
+
* @method
|
|
36
|
+
* @returns {string} stream endpoint URL
|
|
37
|
+
* @example
|
|
38
|
+
* const img = document.createElement('img')
|
|
39
|
+
* img.src = await camera.streamUrl()
|
|
40
|
+
* document.body.appendChild(img)
|
|
41
|
+
*/
|
|
42
|
+
async streamUrl (streamOpt = {}, deviceOpt) {
|
|
43
|
+
const device = await this.setupDevice(deviceOpt)
|
|
44
|
+
return device.streamUrl(streamOpt)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Get the most recent frame from a device's live feed.
|
|
49
|
+
*
|
|
50
|
+
* @description This method will startup the device's live
|
|
51
|
+
* feed if necessary and wait for it to initialize before returning a frame.
|
|
52
|
+
* Subsequent calls will return the next available frame.
|
|
53
|
+
* You must manually stop the live feed if you are using this method.
|
|
54
|
+
*
|
|
55
|
+
* If implementing a real-time preview, it is highly recommended to use the
|
|
56
|
+
* stream endpoint which will stream a Motion JPEG.
|
|
57
|
+
*
|
|
58
|
+
* @see {@link CapturePlugin#streamUrl}
|
|
59
|
+
* @see {@link CapturePlugin#stopFeed}
|
|
60
|
+
*
|
|
61
|
+
* @param {CaptureOptions} [captureOpt] - Additional options for capturing a
|
|
62
|
+
* photo.
|
|
63
|
+
*
|
|
64
|
+
* @param {string|object} [deviceOpt] - Return the frame from either a
|
|
65
|
+
* specific Device ID or a Device Object. The default, if not supplied, is the
|
|
66
|
+
* first available device.
|
|
67
|
+
*
|
|
68
|
+
* @async
|
|
69
|
+
* @method
|
|
70
|
+
* @example
|
|
71
|
+
* // Get the most recent frame from the camera's live feed as an ArrayBuffer
|
|
72
|
+
* // and add it to an img tag appended to the document's body.
|
|
73
|
+
* const img = document.createElement('img')
|
|
74
|
+
* img.src = await camera.getMostRecentFrame()
|
|
75
|
+
* document.body.appendChild(img)
|
|
76
|
+
*
|
|
77
|
+
* // Stop the live feed when done getting frames
|
|
78
|
+
* await camera.stopFeed()
|
|
79
|
+
*/
|
|
80
|
+
async getMostRecentFrame (captureOpt = {}, deviceOpt) {
|
|
81
|
+
if (typeof captureOpt === 'string' && DEPRECATION_01) {
|
|
82
|
+
captureOpt = { kind: captureOpt }
|
|
83
|
+
console.warn('CaptureBridge SDK Deprecation Warning: ' +
|
|
84
|
+
'`StreamingCapturePlugin.getMostRecentFrame()` converted the ' +
|
|
85
|
+
'`captureOpt` argument from a string (%s) to an object (%s). This ' +
|
|
86
|
+
'conversion may not be performed in future SDK versions.',
|
|
87
|
+
captureOpt.kind, JSON.stringify(captureOpt))
|
|
88
|
+
}
|
|
89
|
+
const mergedOpt = Object.assign({}, DEFAULT_CAPTURE_OPT, captureOpt)
|
|
90
|
+
const device = await this.setupDevice(mergedOpt)
|
|
91
|
+
switch (mergedOpt.kind) {
|
|
92
|
+
case 'objecturl':
|
|
93
|
+
return URL.createObjectURL(await device.frameAsBlob(mergedOpt))
|
|
94
|
+
case 'blob':
|
|
95
|
+
return await device.frameAsBlob(mergedOpt)
|
|
96
|
+
case 'buffer':
|
|
97
|
+
return await blobToBuffer(await device.frameAsBlob(mergedOpt))
|
|
98
|
+
case 'base64':
|
|
99
|
+
return await device.frameAsBase64(mergedOpt)
|
|
100
|
+
case 'dataurl':
|
|
101
|
+
return DATAURL_JPEG + (await device.frameAsBase64(mergedOpt))
|
|
102
|
+
}
|
|
103
|
+
throw new Error(`Unknown image response kind: ${mergedOpt.kind}`)
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Stop the camera's live feed if it is running.
|
|
108
|
+
*
|
|
109
|
+
* @param {string|object} [deviceOpt] - Stop the feed for a specific Device ID
|
|
110
|
+
* or a Device Object. The default, if not supplied, is the first available
|
|
111
|
+
* device.
|
|
112
|
+
*
|
|
113
|
+
* @method
|
|
114
|
+
* @async
|
|
115
|
+
* @returns {object} Status of the stop operation
|
|
116
|
+
* @example
|
|
117
|
+
* // CapturePlugin is now running it's live feed in a background thread
|
|
118
|
+
* const frame = await camera.getMostRecentFrame()
|
|
119
|
+
* // Do some stuff with frame...
|
|
120
|
+
* // Stop the live feed
|
|
121
|
+
* console.log(await camera.stopFeed())
|
|
122
|
+
*/
|
|
123
|
+
async stopFeed (deviceOpt) {
|
|
124
|
+
const device = await this.setupDevice(deviceOpt)
|
|
125
|
+
return await device.stopFeed()
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export default StreamingCapturePlugin
|
package/TopazSigGem.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import SignatureTablet from './SignatureTablet.js'
|
|
2
|
-
import { BASE_URL } from './Common.js'
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* TopazSigGem
|
|
6
|
-
* @classdesc Convience class for instantiating a Topaz SigGem Signature Tablet
|
|
7
|
-
* Inherits all methods on the {@link SignatureTablet} class.
|
|
8
|
-
*
|
|
9
|
-
* @see {@link SignatureTablet}
|
|
10
|
-
*/
|
|
11
|
-
class TopazSigGem extends SignatureTablet {
|
|
12
|
-
/**
|
|
13
|
-
* Instantiate a Topaz SigGem Signature Tablet
|
|
14
|
-
* @constructor
|
|
15
|
-
* @param {string} [baseURL] - Protocol, domain, and port for the service.
|
|
16
|
-
* @example
|
|
17
|
-
* const camera = new TopazSigGem()
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
constructor (baseUrl = BASE_URL) {
|
|
21
|
-
super('capture_signature_topaz', baseUrl)
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export default TopazSigGem
|
|
1
|
+
import SignatureTablet from './SignatureTablet.js'
|
|
2
|
+
import { BASE_URL } from './Common.js'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* TopazSigGem
|
|
6
|
+
* @classdesc Convience class for instantiating a Topaz SigGem Signature Tablet
|
|
7
|
+
* Inherits all methods on the {@link SignatureTablet} class.
|
|
8
|
+
* @extends SignatureTablet
|
|
9
|
+
* @see {@link SignatureTablet}
|
|
10
|
+
*/
|
|
11
|
+
class TopazSigGem extends SignatureTablet {
|
|
12
|
+
/**
|
|
13
|
+
* Instantiate a Topaz SigGem Signature Tablet
|
|
14
|
+
* @constructor
|
|
15
|
+
* @param {string} [baseURL] - Protocol, domain, and port for the service.
|
|
16
|
+
* @example
|
|
17
|
+
* const camera = new TopazSigGem()
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
constructor (baseUrl = BASE_URL) {
|
|
21
|
+
super('capture_signature_topaz', baseUrl)
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export default TopazSigGem
|