hyperdeck-connection 2.0.1 → 3.0.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.md +99 -83
- package/README.md +11 -16
- package/dist/asyncHandlers/configuration.d.ts +4 -4
- package/dist/asyncHandlers/configuration.d.ts.map +1 -1
- package/dist/asyncHandlers/configuration.js +8 -14
- package/dist/asyncHandlers/configuration.js.map +1 -1
- package/dist/asyncHandlers/displayTimecode.d.ts +4 -4
- package/dist/asyncHandlers/displayTimecode.d.ts.map +1 -1
- package/dist/asyncHandlers/displayTimecode.js +4 -10
- package/dist/asyncHandlers/displayTimecode.js.map +1 -1
- package/dist/asyncHandlers/iHandler.d.ts +3 -3
- package/dist/asyncHandlers/iHandler.d.ts.map +1 -1
- package/dist/asyncHandlers/iHandler.js +1 -2
- package/dist/asyncHandlers/iHandler.js.map +1 -1
- package/dist/asyncHandlers/index.d.ts +7 -7
- package/dist/asyncHandlers/index.d.ts.map +1 -1
- package/dist/asyncHandlers/index.js +7 -10
- package/dist/asyncHandlers/index.js.map +1 -1
- package/dist/asyncHandlers/remoteInfo.d.ts +4 -4
- package/dist/asyncHandlers/remoteInfo.d.ts.map +1 -1
- package/dist/asyncHandlers/remoteInfo.js +6 -12
- package/dist/asyncHandlers/remoteInfo.js.map +1 -1
- package/dist/asyncHandlers/slotInfo.d.ts +4 -4
- package/dist/asyncHandlers/slotInfo.d.ts.map +1 -1
- package/dist/asyncHandlers/slotInfo.js +7 -12
- package/dist/asyncHandlers/slotInfo.js.map +1 -1
- package/dist/asyncHandlers/timelinePosition.d.ts +4 -4
- package/dist/asyncHandlers/timelinePosition.d.ts.map +1 -1
- package/dist/asyncHandlers/timelinePosition.js +4 -10
- package/dist/asyncHandlers/timelinePosition.js.map +1 -1
- package/dist/asyncHandlers/transportInfo.d.ts +4 -4
- package/dist/asyncHandlers/transportInfo.d.ts.map +1 -1
- package/dist/asyncHandlers/transportInfo.js +14 -19
- package/dist/asyncHandlers/transportInfo.js.map +1 -1
- package/dist/codes.d.ts +1 -1
- package/dist/codes.d.ts.map +1 -1
- package/dist/codes.js +10 -13
- package/dist/codes.js.map +1 -1
- package/dist/commands/abstractCommand.d.ts +2 -2
- package/dist/commands/abstractCommand.d.ts.map +1 -1
- package/dist/commands/abstractCommand.js +4 -12
- package/dist/commands/abstractCommand.js.map +1 -1
- package/dist/commands/cacheInfo.d.ts +3 -3
- package/dist/commands/cacheInfo.d.ts.map +1 -1
- package/dist/commands/cacheInfo.js +4 -11
- package/dist/commands/cacheInfo.js.map +1 -1
- package/dist/commands/clips.d.ts +5 -5
- package/dist/commands/clips.d.ts.map +1 -1
- package/dist/commands/clips.js +15 -18
- package/dist/commands/clips.js.map +1 -1
- package/dist/commands/configuration.d.ts +5 -5
- package/dist/commands/configuration.d.ts.map +1 -1
- package/dist/commands/configuration.js +17 -15
- package/dist/commands/configuration.js.map +1 -1
- package/dist/commands/connect.js +1 -2
- package/dist/commands/deviceInfo.d.ts +3 -3
- package/dist/commands/deviceInfo.d.ts.map +1 -1
- package/dist/commands/deviceInfo.js +4 -11
- package/dist/commands/deviceInfo.js.map +1 -1
- package/dist/commands/diskList.d.ts +3 -3
- package/dist/commands/diskList.d.ts.map +1 -1
- package/dist/commands/diskList.js +5 -8
- package/dist/commands/diskList.js.map +1 -1
- package/dist/commands/dynamicRange.d.ts +4 -4
- package/dist/commands/dynamicRange.d.ts.map +1 -1
- package/dist/commands/dynamicRange.js +7 -13
- package/dist/commands/dynamicRange.js.map +1 -1
- package/dist/commands/format.d.ts +4 -4
- package/dist/commands/format.d.ts.map +1 -1
- package/dist/commands/format.js +10 -13
- package/dist/commands/format.js.map +1 -1
- package/dist/commands/goTo.d.ts +2 -2
- package/dist/commands/goTo.d.ts.map +1 -1
- package/dist/commands/goTo.js +6 -6
- package/dist/commands/goTo.js.map +1 -1
- package/dist/commands/identify.d.ts +2 -2
- package/dist/commands/identify.d.ts.map +1 -1
- package/dist/commands/identify.js +3 -6
- package/dist/commands/identify.js.map +1 -1
- package/dist/commands/index.d.ts +25 -25
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +25 -30
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/internal.d.ts +4 -4
- package/dist/commands/internal.d.ts.map +1 -1
- package/dist/commands/internal.js +8 -17
- package/dist/commands/internal.js.map +1 -1
- package/dist/commands/jog.d.ts +2 -2
- package/dist/commands/jog.d.ts.map +1 -1
- package/dist/commands/jog.js +3 -6
- package/dist/commands/jog.js.map +1 -1
- package/dist/commands/notify.d.ts +3 -3
- package/dist/commands/notify.d.ts.map +1 -1
- package/dist/commands/notify.js +27 -24
- package/dist/commands/notify.js.map +1 -1
- package/dist/commands/play.d.ts +2 -2
- package/dist/commands/play.d.ts.map +1 -1
- package/dist/commands/play.js +5 -6
- package/dist/commands/play.js.map +1 -1
- package/dist/commands/playOnStartup.d.ts +3 -3
- package/dist/commands/playOnStartup.d.ts.map +1 -1
- package/dist/commands/playOnStartup.js +7 -13
- package/dist/commands/playOnStartup.js.map +1 -1
- package/dist/commands/playOption.d.ts +3 -3
- package/dist/commands/playOption.d.ts.map +1 -1
- package/dist/commands/playOption.js +6 -13
- package/dist/commands/playOption.js.map +1 -1
- package/dist/commands/playrange.d.ts +3 -3
- package/dist/commands/playrange.d.ts.map +1 -1
- package/dist/commands/playrange.js +12 -15
- package/dist/commands/playrange.js.map +1 -1
- package/dist/commands/preview.d.ts +2 -2
- package/dist/commands/preview.d.ts.map +1 -1
- package/dist/commands/preview.js +3 -6
- package/dist/commands/preview.js.map +1 -1
- package/dist/commands/record.d.ts +2 -2
- package/dist/commands/record.d.ts.map +1 -1
- package/dist/commands/record.js +6 -8
- package/dist/commands/record.js.map +1 -1
- package/dist/commands/remote.d.ts +3 -3
- package/dist/commands/remote.d.ts.map +1 -1
- package/dist/commands/remote.js +9 -16
- package/dist/commands/remote.js.map +1 -1
- package/dist/commands/shuttle.d.ts +2 -2
- package/dist/commands/shuttle.d.ts.map +1 -1
- package/dist/commands/shuttle.js +4 -7
- package/dist/commands/shuttle.js.map +1 -1
- package/dist/commands/slotInfo.d.ts +4 -4
- package/dist/commands/slotInfo.d.ts.map +1 -1
- package/dist/commands/slotInfo.js +6 -8
- package/dist/commands/slotInfo.js.map +1 -1
- package/dist/commands/slotSelect.d.ts +3 -3
- package/dist/commands/slotSelect.d.ts.map +1 -1
- package/dist/commands/slotSelect.js +7 -8
- package/dist/commands/slotSelect.js.map +1 -1
- package/dist/commands/stop.d.ts +2 -2
- package/dist/commands/stop.d.ts.map +1 -1
- package/dist/commands/stop.js +2 -6
- package/dist/commands/stop.js.map +1 -1
- package/dist/commands/transportInfo.d.ts +4 -4
- package/dist/commands/transportInfo.d.ts.map +1 -1
- package/dist/commands/transportInfo.js +12 -18
- package/dist/commands/transportInfo.js.map +1 -1
- package/dist/enums.js +10 -13
- package/dist/enums.js.map +1 -1
- package/dist/events.d.ts +2 -2
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +1 -2
- package/dist/events.js.map +1 -1
- package/dist/hyperdeck.d.ts +3 -3
- package/dist/hyperdeck.d.ts.map +1 -1
- package/dist/hyperdeck.js +40 -37
- package/dist/hyperdeck.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -9
- package/dist/index.js.map +1 -1
- package/dist/message.d.ts +1 -1
- package/dist/message.d.ts.map +1 -1
- package/dist/message.js +1 -2
- package/dist/parser.d.ts +1 -1
- package/dist/parser.d.ts.map +1 -1
- package/dist/parser.js +8 -11
- package/dist/parser.js.map +1 -1
- package/dist/util.d.ts +1 -1
- package/dist/util.d.ts.map +1 -1
- package/dist/util.js +5 -13
- package/dist/util.js.map +1 -1
- package/package.json +44 -44
package/dist/commands/remote.js
CHANGED
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const abstractCommand_1 = require("./abstractCommand");
|
|
7
|
-
class RemoteGetCommand extends abstractCommand_1.AbstractCommand {
|
|
8
|
-
constructor() {
|
|
9
|
-
super(...arguments);
|
|
10
|
-
this.expectedResponseCode = codes_1.SynchronousCode.RemoteInfo;
|
|
11
|
-
}
|
|
1
|
+
import { SynchronousCode } from '../codes.js';
|
|
2
|
+
import { parseBool } from '../util.js';
|
|
3
|
+
import { AbstractCommand, AbstractCommandNoResponse } from './abstractCommand.js';
|
|
4
|
+
export class RemoteGetCommand extends AbstractCommand {
|
|
5
|
+
expectedResponseCode = SynchronousCode.RemoteInfo;
|
|
12
6
|
deserialize(msg) {
|
|
13
7
|
const res = {
|
|
14
|
-
enabled:
|
|
15
|
-
override:
|
|
8
|
+
enabled: parseBool(msg.params['enabled']),
|
|
9
|
+
override: parseBool(msg.params['override']),
|
|
16
10
|
};
|
|
17
11
|
return res;
|
|
18
12
|
}
|
|
@@ -24,8 +18,8 @@ class RemoteGetCommand extends abstractCommand_1.AbstractCommand {
|
|
|
24
18
|
return res;
|
|
25
19
|
}
|
|
26
20
|
}
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
export class RemoteCommand extends AbstractCommandNoResponse {
|
|
22
|
+
enable;
|
|
29
23
|
constructor(enable) {
|
|
30
24
|
super();
|
|
31
25
|
this.enable = enable;
|
|
@@ -40,5 +34,4 @@ class RemoteCommand extends abstractCommand_1.AbstractCommandNoResponse {
|
|
|
40
34
|
return res;
|
|
41
35
|
}
|
|
42
36
|
}
|
|
43
|
-
exports.RemoteCommand = RemoteCommand;
|
|
44
37
|
//# sourceMappingURL=remote.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote.js","sourceRoot":"","sources":["../../src/commands/remote.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"remote.js","sourceRoot":"","sources":["../../src/commands/remote.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AACtC,OAAO,EAAE,eAAe,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AAOjF,MAAM,OAAO,gBAAiB,SAAQ,eAA0C;IAC/E,oBAAoB,GAAG,eAAe,CAAC,UAAU,CAAA;IAEjD,WAAW,CAAC,GAAoB;QAC/B,MAAM,GAAG,GAA8B;YACtC,OAAO,EAAE,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YACzC,QAAQ,EAAE,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;SAC3C,CAAA;QACD,OAAO,GAAG,CAAA;IACX,CAAC;IACD,SAAS;QACR,MAAM,GAAG,GAAiB;YACzB,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,EAAE;SACV,CAAA;QAED,OAAO,GAAG,CAAA;IACX,CAAC;CACD;AAED,MAAM,OAAO,aAAc,SAAQ,yBAAyB;IAC3D,MAAM,CAAU;IAEhB,YAAY,MAAgB;QAC3B,KAAK,EAAE,CAAA;QAEP,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACrB,CAAC;IAED,SAAS;QACR,MAAM,GAAG,GAAiB;YACzB,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,EAAE;SACV,CAAA;QAED,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS;YAAE,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAA;QAEjF,OAAO,GAAG,CAAA;IACX,CAAC;CACD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NamedMessage } from '../message';
|
|
2
|
-
import { AbstractCommandNoResponse } from './abstractCommand';
|
|
1
|
+
import type { NamedMessage } from '../message.js';
|
|
2
|
+
import { AbstractCommandNoResponse } from './abstractCommand.js';
|
|
3
3
|
export declare class ShuttleCommand extends AbstractCommandNoResponse {
|
|
4
4
|
speed?: number;
|
|
5
5
|
constructor(speed?: number);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shuttle.d.ts","sourceRoot":"","sources":["../../src/commands/shuttle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"shuttle.d.ts","sourceRoot":"","sources":["../../src/commands/shuttle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AAEhE,qBAAa,cAAe,SAAQ,yBAAyB;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAA;gBAEF,KAAK,CAAC,EAAE,MAAM;IAM1B,SAAS,IAAI,YAAY;CAUzB"}
|
package/dist/commands/shuttle.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const abstractCommand_1 = require("./abstractCommand");
|
|
5
|
-
class ShuttleCommand extends abstractCommand_1.AbstractCommandNoResponse {
|
|
1
|
+
import { AbstractCommandNoResponse } from './abstractCommand.js';
|
|
2
|
+
export class ShuttleCommand extends AbstractCommandNoResponse {
|
|
3
|
+
speed;
|
|
6
4
|
constructor(speed) {
|
|
7
5
|
super();
|
|
8
6
|
this.speed = speed;
|
|
@@ -12,10 +10,9 @@ class ShuttleCommand extends abstractCommand_1.AbstractCommandNoResponse {
|
|
|
12
10
|
name: 'shuttle',
|
|
13
11
|
params: {},
|
|
14
12
|
};
|
|
15
|
-
if (this.speed)
|
|
13
|
+
if (this.speed !== undefined)
|
|
16
14
|
res.params.speed = this.speed + '';
|
|
17
15
|
return res;
|
|
18
16
|
}
|
|
19
17
|
}
|
|
20
|
-
exports.ShuttleCommand = ShuttleCommand;
|
|
21
18
|
//# sourceMappingURL=shuttle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shuttle.js","sourceRoot":"","sources":["../../src/commands/shuttle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shuttle.js","sourceRoot":"","sources":["../../src/commands/shuttle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AAEhE,MAAM,OAAO,cAAe,SAAQ,yBAAyB;IAC5D,KAAK,CAAS;IAEd,YAAY,KAAc;QACzB,KAAK,EAAE,CAAA;QAEP,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;IACnB,CAAC;IAED,SAAS;QACR,MAAM,GAAG,GAAiB;YACzB,IAAI,EAAE,SAAS;YACf,MAAM,EAAE,EAAE;SACV,CAAA;QAED,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS;YAAE,GAAG,CAAC,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;QAEhE,OAAO,GAAG,CAAA;IACX,CAAC;CACD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SynchronousCode } from '../codes';
|
|
2
|
-
import { VideoFormat, SlotStatus } from '../enums';
|
|
3
|
-
import { ResponseMessage, NamedMessage } from '../message';
|
|
4
|
-
import { AbstractCommand } from './abstractCommand';
|
|
1
|
+
import { SynchronousCode } from '../codes.js';
|
|
2
|
+
import { VideoFormat, SlotStatus } from '../enums.js';
|
|
3
|
+
import type { ResponseMessage, NamedMessage } from '../message.js';
|
|
4
|
+
import { AbstractCommand } from './abstractCommand.js';
|
|
5
5
|
export interface SlotInfoCommandResponse {
|
|
6
6
|
slotId: number;
|
|
7
7
|
status: SlotStatus;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slotInfo.d.ts","sourceRoot":"","sources":["../../src/commands/slotInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"slotInfo.d.ts","sourceRoot":"","sources":["../../src/commands/slotInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAEtD,MAAM,WAAW,uBAAuB;IACvC,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,UAAU,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;IACrB,WAAW,EAAE,WAAW,CAAA;CACxB;AAED,qBAAa,eAAgB,SAAQ,eAAe,CAAC,uBAAuB,CAAC;IAC5E,oBAAoB,kBAA2B;IAE/C,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;gBAEZ,MAAM,CAAC,EAAE,MAAM;IAK3B,WAAW,CAAC,GAAG,EAAE,eAAe,GAAG,uBAAuB;IAU1D,SAAS,IAAI,YAAY;CAUzB"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { SynchronousCode } from '../codes.js';
|
|
2
|
+
import { VideoFormat, SlotStatus } from '../enums.js';
|
|
3
|
+
import { AbstractCommand } from './abstractCommand.js';
|
|
4
|
+
export class SlotInfoCommand extends AbstractCommand {
|
|
5
|
+
expectedResponseCode = SynchronousCode.SlotInfo;
|
|
6
|
+
slotId;
|
|
7
7
|
constructor(slotId) {
|
|
8
8
|
super();
|
|
9
|
-
this.expectedResponseCode = codes_1.SynchronousCode.SlotInfo;
|
|
10
9
|
this.slotId = slotId;
|
|
11
10
|
}
|
|
12
11
|
deserialize(msg) {
|
|
@@ -29,5 +28,4 @@ class SlotInfoCommand extends abstractCommand_1.AbstractCommand {
|
|
|
29
28
|
return res;
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
|
-
exports.SlotInfoCommand = SlotInfoCommand;
|
|
33
31
|
//# sourceMappingURL=slotInfo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slotInfo.js","sourceRoot":"","sources":["../../src/commands/slotInfo.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"slotInfo.js","sourceRoot":"","sources":["../../src/commands/slotInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAErD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAUtD,MAAM,OAAO,eAAgB,SAAQ,eAAwC;IAC5E,oBAAoB,GAAG,eAAe,CAAC,QAAQ,CAAA;IAEtC,MAAM,CAAS;IAExB,YAAY,MAAe;QAC1B,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACrB,CAAC;IAED,WAAW,CAAC,GAAoB;QAC/B,MAAM,GAAG,GAA4B;YACpC,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,EAAE,CAAC;YAC3C,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAe;YAC1C,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC;YACrC,aAAa,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,EAAE,EAAE,CAAC;YACzD,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,cAAc,CAAgB;SACtD,CAAA;QACD,OAAO,GAAG,CAAA;IACX,CAAC;IACD,SAAS;QACR,MAAM,GAAG,GAAiB;YACzB,IAAI,EAAE,WAAW;YACjB,MAAM,EAAE,EAAE;SACV,CAAA;QAED,IAAI,IAAI,CAAC,MAAM;YAAE,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,EAAE,CAAA;QAEzD,OAAO,GAAG,CAAA;IACX,CAAC;CACD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AbstractCommandNoResponse } from './abstractCommand';
|
|
2
|
-
import { NamedMessage } from '../message';
|
|
3
|
-
import { VideoFormat } from '../enums';
|
|
1
|
+
import { AbstractCommandNoResponse } from './abstractCommand.js';
|
|
2
|
+
import type { NamedMessage } from '../message.js';
|
|
3
|
+
import { VideoFormat } from '../enums.js';
|
|
4
4
|
export declare class SlotSelectCommand extends AbstractCommandNoResponse {
|
|
5
5
|
slotId?: number;
|
|
6
6
|
format?: VideoFormat;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slotSelect.d.ts","sourceRoot":"","sources":["../../src/commands/slotSelect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"slotSelect.d.ts","sourceRoot":"","sources":["../../src/commands/slotSelect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC,qBAAa,iBAAkB,SAAQ,yBAAyB;IAC/D,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,WAAW,CAAA;IAEpB,SAAS,IAAI,YAAY;CAezB;AAED,qBAAa,kBAAmB,SAAQ,yBAAyB;IAC7C,MAAM,EAAE,MAAM;gBAAd,MAAM,EAAE,MAAM;IAIjC,SAAS,IAAI,YAAY;CAYzB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { AbstractCommandNoResponse } from './abstractCommand.js';
|
|
2
|
+
import { VideoFormat } from '../enums.js';
|
|
3
|
+
export class SlotSelectCommand extends AbstractCommandNoResponse {
|
|
4
|
+
slotId;
|
|
5
|
+
format;
|
|
6
6
|
serialize() {
|
|
7
7
|
const res = {
|
|
8
8
|
name: 'slot select',
|
|
@@ -17,8 +17,8 @@ class SlotSelectCommand extends abstractCommand_1.AbstractCommandNoResponse {
|
|
|
17
17
|
return res;
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
export class SlotUnblockCommand extends AbstractCommandNoResponse {
|
|
21
|
+
slotId;
|
|
22
22
|
constructor(slotId) {
|
|
23
23
|
super();
|
|
24
24
|
this.slotId = slotId;
|
|
@@ -34,5 +34,4 @@ class SlotUnblockCommand extends abstractCommand_1.AbstractCommandNoResponse {
|
|
|
34
34
|
return res;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
exports.SlotUnblockCommand = SlotUnblockCommand;
|
|
38
37
|
//# sourceMappingURL=slotSelect.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slotSelect.js","sourceRoot":"","sources":["../../src/commands/slotSelect.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"slotSelect.js","sourceRoot":"","sources":["../../src/commands/slotSelect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AAEhE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC,MAAM,OAAO,iBAAkB,SAAQ,yBAAyB;IAC/D,MAAM,CAAS;IACf,MAAM,CAAc;IAEpB,SAAS;QACR,MAAM,GAAG,GAAiB;YACzB,IAAI,EAAE,aAAa;YACnB,MAAM,EAAE,EAAE;SACV,CAAA;QAED,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YACjB,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,EAAE,CAAA;QACzC,CAAC;QACD,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YACjB,GAAG,CAAC,MAAM,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,MAAM,CAAA;QACzC,CAAC;QAED,OAAO,GAAG,CAAA;IACX,CAAC;CACD;AAED,MAAM,OAAO,kBAAmB,SAAQ,yBAAyB;IAC7C;IAAnB,YAAmB,MAAc;QAChC,KAAK,EAAE,CAAA;QADW,WAAM,GAAN,MAAM,CAAQ;IAEjC,CAAC;IAED,SAAS;QACR,MAAM,GAAG,GAAiB;YACzB,IAAI,EAAE,cAAc;YACpB,MAAM,EAAE,EAAE;SACV,CAAA;QAED,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YACjB,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,MAAM,CAAA;QACpC,CAAC;QAED,OAAO,GAAG,CAAA;IACX,CAAC;CACD"}
|
package/dist/commands/stop.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NamedMessage } from '../message';
|
|
2
|
-
import { AbstractCommandNoResponse } from './abstractCommand';
|
|
1
|
+
import type { NamedMessage } from '../message.js';
|
|
2
|
+
import { AbstractCommandNoResponse } from './abstractCommand.js';
|
|
3
3
|
export declare class StopCommand extends AbstractCommandNoResponse {
|
|
4
4
|
serialize(): NamedMessage;
|
|
5
5
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stop.d.ts","sourceRoot":"","sources":["../../src/commands/stop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"stop.d.ts","sourceRoot":"","sources":["../../src/commands/stop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AAEhE,qBAAa,WAAY,SAAQ,yBAAyB;IACzD,SAAS,IAAI,YAAY;CAQzB"}
|
package/dist/commands/stop.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.StopCommand = void 0;
|
|
4
|
-
const abstractCommand_1 = require("./abstractCommand");
|
|
5
|
-
class StopCommand extends abstractCommand_1.AbstractCommandNoResponse {
|
|
1
|
+
import { AbstractCommandNoResponse } from './abstractCommand.js';
|
|
2
|
+
export class StopCommand extends AbstractCommandNoResponse {
|
|
6
3
|
serialize() {
|
|
7
4
|
const res = {
|
|
8
5
|
name: 'stop',
|
|
@@ -11,5 +8,4 @@ class StopCommand extends abstractCommand_1.AbstractCommandNoResponse {
|
|
|
11
8
|
return res;
|
|
12
9
|
}
|
|
13
10
|
}
|
|
14
|
-
exports.StopCommand = StopCommand;
|
|
15
11
|
//# sourceMappingURL=stop.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stop.js","sourceRoot":"","sources":["../../src/commands/stop.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stop.js","sourceRoot":"","sources":["../../src/commands/stop.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AAEhE,MAAM,OAAO,WAAY,SAAQ,yBAAyB;IACzD,SAAS;QACR,MAAM,GAAG,GAAiB;YACzB,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,EAAE;SACV,CAAA;QAED,OAAO,GAAG,CAAA;IACX,CAAC;CACD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SynchronousCode } from '../codes';
|
|
2
|
-
import { TransportStatus, VideoFormat } from '../enums';
|
|
3
|
-
import { ResponseMessage, NamedMessage } from '../message';
|
|
4
|
-
import { AbstractCommand } from './abstractCommand';
|
|
1
|
+
import { SynchronousCode } from '../codes.js';
|
|
2
|
+
import { TransportStatus, VideoFormat } from '../enums.js';
|
|
3
|
+
import type { ResponseMessage, NamedMessage } from '../message.js';
|
|
4
|
+
import { AbstractCommand } from './abstractCommand.js';
|
|
5
5
|
export interface TransportInfoCommandResponse {
|
|
6
6
|
status: TransportStatus;
|
|
7
7
|
speed: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transportInfo.d.ts","sourceRoot":"","sources":["../../src/commands/transportInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"transportInfo.d.ts","sourceRoot":"","sources":["../../src/commands/transportInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAGtD,MAAM,WAAW,4BAA4B;IAC5C,MAAM,EAAE,eAAe,CAAA;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,UAAU,EAAE,OAAO,CAAA;IACnB,eAAe,EAAE,MAAM,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,WAAW,GAAG,IAAI,CAAA;IAC/B,IAAI,EAAE,OAAO,CAAA;IACb,4BAA4B;IAC5B,gBAAgB,EAAE,WAAW,GAAG,IAAI,CAAA;CACpC;AAED,qBAAa,oBAAqB,SAAQ,eAAe,CAAC,4BAA4B,CAAC;IACtF,oBAAoB,kBAAgC;IAEpD,WAAW,CAAC,GAAG,EAAE,eAAe,GAAG,4BAA4B;IAe/D,SAAS,IAAI,YAAY;CAQzB"}
|
|
@@ -1,26 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class TransportInfoCommand extends abstractCommand_1.AbstractCommand {
|
|
8
|
-
constructor() {
|
|
9
|
-
super(...arguments);
|
|
10
|
-
this.expectedResponseCode = codes_1.SynchronousCode.TransportInfo;
|
|
11
|
-
}
|
|
1
|
+
import { SynchronousCode } from '../codes.js';
|
|
2
|
+
import { TransportStatus, VideoFormat } from '../enums.js';
|
|
3
|
+
import { AbstractCommand } from './abstractCommand.js';
|
|
4
|
+
import { parseIdOrNone, parseBool, parseStringOrNone } from '../util.js';
|
|
5
|
+
export class TransportInfoCommand extends AbstractCommand {
|
|
6
|
+
expectedResponseCode = SynchronousCode.TransportInfo;
|
|
12
7
|
deserialize(msg) {
|
|
13
8
|
const res = {
|
|
14
9
|
status: msg.params['status'],
|
|
15
10
|
speed: parseInt(msg.params['speed'], 10),
|
|
16
|
-
slotId:
|
|
17
|
-
clipId:
|
|
18
|
-
singleClip:
|
|
11
|
+
slotId: parseIdOrNone(msg.params['slot id']) || null,
|
|
12
|
+
clipId: parseIdOrNone(msg.params['clip id']) || null,
|
|
13
|
+
singleClip: parseBool(msg.params['single clip']) || false,
|
|
19
14
|
displayTimecode: msg.params['display timecode'],
|
|
20
15
|
timecode: msg.params['timecode'],
|
|
21
|
-
videoFormat: (
|
|
22
|
-
loop:
|
|
23
|
-
inputVideoFormat: (
|
|
16
|
+
videoFormat: (parseStringOrNone(msg.params['video format']) ?? null),
|
|
17
|
+
loop: parseBool(msg.params['loop']) || false,
|
|
18
|
+
inputVideoFormat: (parseStringOrNone(msg.params['input video format']) || null),
|
|
24
19
|
};
|
|
25
20
|
return res;
|
|
26
21
|
}
|
|
@@ -32,5 +27,4 @@ class TransportInfoCommand extends abstractCommand_1.AbstractCommand {
|
|
|
32
27
|
return res;
|
|
33
28
|
}
|
|
34
29
|
}
|
|
35
|
-
exports.TransportInfoCommand = TransportInfoCommand;
|
|
36
30
|
//# sourceMappingURL=transportInfo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transportInfo.js","sourceRoot":"","sources":["../../src/commands/transportInfo.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transportInfo.js","sourceRoot":"","sources":["../../src/commands/transportInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAE1D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAgBxE,MAAM,OAAO,oBAAqB,SAAQ,eAA6C;IACtF,oBAAoB,GAAG,eAAe,CAAC,aAAa,CAAA;IAEpD,WAAW,CAAC,GAAoB;QAC/B,MAAM,GAAG,GAAiC;YACzC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAoB;YAC/C,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC;YACxC,MAAM,EAAE,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,IAAI,IAAI;YACpD,MAAM,EAAE,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,IAAI,IAAI;YACpD,UAAU,EAAE,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,IAAI,KAAK;YACzD,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,kBAAkB,CAAC;YAC/C,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC;YAChC,WAAW,EAAE,CAAC,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,IAAI,IAAI,CAAuB;YAC1F,IAAI,EAAE,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK;YAC5C,gBAAgB,EAAE,CAAC,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,IAAI,IAAI,CAAuB;SACrG,CAAA;QACD,OAAO,GAAG,CAAA;IACX,CAAC;IACD,SAAS;QACR,MAAM,GAAG,GAAiB;YACzB,IAAI,EAAE,gBAAgB;YACtB,MAAM,EAAE,EAAE;SACV,CAAA;QAED,OAAO,GAAG,CAAA;IACX,CAAC;CACD"}
|
package/dist/enums.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DynamicRange = exports.FilesystemFormat = exports.VideoFormat = exports.SlotStatus = exports.TransportStatus = void 0;
|
|
4
|
-
var TransportStatus;
|
|
1
|
+
export var TransportStatus;
|
|
5
2
|
(function (TransportStatus) {
|
|
6
3
|
TransportStatus["PREVIEW"] = "preview";
|
|
7
4
|
TransportStatus["STOPPED"] = "stopped";
|
|
@@ -11,15 +8,15 @@ var TransportStatus;
|
|
|
11
8
|
TransportStatus["JOG"] = "jog";
|
|
12
9
|
TransportStatus["SHUTTLE"] = "shuttle";
|
|
13
10
|
TransportStatus["RECORD"] = "record";
|
|
14
|
-
})(TransportStatus
|
|
15
|
-
var SlotStatus;
|
|
11
|
+
})(TransportStatus || (TransportStatus = {}));
|
|
12
|
+
export var SlotStatus;
|
|
16
13
|
(function (SlotStatus) {
|
|
17
14
|
SlotStatus["EMPTY"] = "empty";
|
|
18
15
|
SlotStatus["MOUNTING"] = "mounting";
|
|
19
16
|
SlotStatus["ERROR"] = "error";
|
|
20
17
|
SlotStatus["MOUNTED"] = "mounted";
|
|
21
|
-
})(SlotStatus
|
|
22
|
-
var VideoFormat;
|
|
18
|
+
})(SlotStatus || (SlotStatus = {}));
|
|
19
|
+
export var VideoFormat;
|
|
23
20
|
(function (VideoFormat) {
|
|
24
21
|
VideoFormat["NTSC"] = "NTSC";
|
|
25
22
|
VideoFormat["PAL"] = "PAL";
|
|
@@ -65,13 +62,13 @@ var VideoFormat;
|
|
|
65
62
|
VideoFormat["_8Kp50"] = "8Kp50";
|
|
66
63
|
VideoFormat["_8Kp5994"] = "8Kp5994";
|
|
67
64
|
VideoFormat["_8Kp60"] = "8Kp60";
|
|
68
|
-
})(VideoFormat
|
|
69
|
-
var FilesystemFormat;
|
|
65
|
+
})(VideoFormat || (VideoFormat = {}));
|
|
66
|
+
export var FilesystemFormat;
|
|
70
67
|
(function (FilesystemFormat) {
|
|
71
68
|
FilesystemFormat["exFAT"] = "exFAT";
|
|
72
69
|
FilesystemFormat["HFS"] = "HFS+";
|
|
73
|
-
})(FilesystemFormat
|
|
74
|
-
var DynamicRange;
|
|
70
|
+
})(FilesystemFormat || (FilesystemFormat = {}));
|
|
71
|
+
export var DynamicRange;
|
|
75
72
|
(function (DynamicRange) {
|
|
76
73
|
DynamicRange["Off"] = "off";
|
|
77
74
|
DynamicRange["Rec709"] = "Rec709";
|
|
@@ -84,5 +81,5 @@ var DynamicRange;
|
|
|
84
81
|
DynamicRange["ST2084_2000"] = "ST2084_2000";
|
|
85
82
|
DynamicRange["ST2084_4000"] = "ST2084_4000";
|
|
86
83
|
DynamicRange["ST2048"] = "ST2048";
|
|
87
|
-
})(DynamicRange
|
|
84
|
+
})(DynamicRange || (DynamicRange = {}));
|
|
88
85
|
//# sourceMappingURL=enums.js.map
|
package/dist/enums.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../src/enums.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../src/enums.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,eASX;AATD,WAAY,eAAe;IAC1B,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;IACnB,gCAAa,CAAA;IACb,sCAAmB,CAAA;IACnB,oCAAiB,CAAA;IACjB,8BAAW,CAAA;IACX,sCAAmB,CAAA;IACnB,oCAAiB,CAAA;AAClB,CA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AAY,gBAAgB;IAC3B,mCAAe,CAAA;IACf,gCAAY,CAAA;AACb,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;AAED,MAAM,CAAN,IAAY,YAYX;AAZD,WAAY,YAAY;IACvB,2BAAW,CAAA;IACX,iCAAiB,CAAA;IACjB,2CAA2B,CAAA;IAC3B,2BAAW,CAAA;IACX,yCAAyB,CAAA;IACzB,yCAAyB,CAAA;IACzB,yCAAyB,CAAA;IACzB,2CAA2B,CAAA;IAC3B,2CAA2B,CAAA;IAC3B,2CAA2B,CAAA;IAC3B,iCAAiB,CAAA;AAClB,CAAC,EAZW,YAAY,KAAZ,YAAY,QAYvB"}
|
package/dist/events.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ConnectionInfoResponse } from './commands/connect';
|
|
2
|
-
import { SlotStatus, TransportStatus, VideoFormat } from './enums';
|
|
1
|
+
import type { ConnectionInfoResponse } from './commands/connect.js';
|
|
2
|
+
import { SlotStatus, TransportStatus, VideoFormat } from './enums.js';
|
|
3
3
|
export interface HyperdeckEvents extends HyperdeckAsyncEvents {
|
|
4
4
|
error: [message: string, error: Error | unknown];
|
|
5
5
|
disconnected: [];
|
package/dist/events.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AACnE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAErE,MAAM,WAAW,eAAgB,SAAQ,oBAAoB;IAC5D,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO,CAA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CAAA;IACpB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IAChC,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,gBAAgB,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;CACrC;AAED,MAAM,WAAW,8BAA8B;IAC9C,gBAAgB,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,sBAAsB;IACtC,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,WAAW,CAAC,EAAE,WAAW,CAAA;CACzB;AAED,MAAM,WAAW,wBAAwB;IACxC,OAAO,CAAC,EAAE,OAAO,CAAA;CACjB"}
|
package/dist/events.js
CHANGED
package/dist/events.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA"}
|
package/dist/hyperdeck.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { AbstractCommand } from './commands/index.js';
|
|
2
|
+
import type { HyperdeckEvents } from './events.js';
|
|
3
|
+
import { EventEmitter } from 'node:events';
|
|
4
4
|
export interface HyperdeckOptions {
|
|
5
5
|
pingPeriod?: number;
|
|
6
6
|
debug?: boolean;
|
package/dist/hyperdeck.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hyperdeck.d.ts","sourceRoot":"","sources":["../src/hyperdeck.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AS,EAAE,OAAO,EAAE,eAAe,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC;IAarF,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED,OAAO,CAAC,uBAAuB;IAO/B,OAAO,CAAC,gBAAgB;IAiBxB,OAAO,CAAC,aAAa;YAmDP,YAAY;IAgB1B,OAAO,CAAC,kBAAkB;YAcZ,aAAa;IAM3B,OAAO,CAAC,YAAY;IAuBpB,OAAO,CAAC,WAAW;IAmCnB,OAAO,CAAC,oBAAoB;IAgB5B,OAAO,CAAC,SAAS;CAGjB"}
|
package/dist/hyperdeck.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const internal_1 = require("./commands/internal");
|
|
9
|
-
const parser_1 = require("./parser");
|
|
1
|
+
import { Socket } from 'net';
|
|
2
|
+
import { ResponseCodeType, GetResponseCodeType, AsynchronousCode } from './codes.js';
|
|
3
|
+
import { AbstractCommand } from './commands/index.js';
|
|
4
|
+
import * as AsyncHandlers from './asyncHandlers/index.js';
|
|
5
|
+
import { DummyConnectCommand, WatchdogPeriodCommand, PingCommand, QuitCommand } from './commands/internal.js';
|
|
6
|
+
import { buildMessageStr, MultilineParser } from './parser.js';
|
|
7
|
+
import { EventEmitter } from 'node:events';
|
|
10
8
|
class QueuedCommand {
|
|
9
|
+
promise;
|
|
10
|
+
command;
|
|
11
11
|
constructor(command) {
|
|
12
12
|
this.command = command;
|
|
13
13
|
this.promise = new Promise((resolve, reject) => {
|
|
@@ -22,22 +22,25 @@ class QueuedCommand {
|
|
|
22
22
|
throw new Error('No promise to reject');
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
class Hyperdeck extends EventEmitter {
|
|
25
|
+
export class Hyperdeck extends EventEmitter {
|
|
26
|
+
DEFAULT_PORT = 9993;
|
|
27
|
+
RECONNECT_INTERVAL = 5000;
|
|
28
|
+
DEBUG = false;
|
|
29
|
+
socket;
|
|
30
|
+
_connected = false;
|
|
31
|
+
_retryConnectTimeout = null;
|
|
32
|
+
_log;
|
|
33
|
+
_commandQueue = [];
|
|
34
|
+
_pingPeriod = 5000;
|
|
35
|
+
_pingInterval = null;
|
|
36
|
+
_lastCommandTime = 0;
|
|
37
|
+
_asyncHandlers = {};
|
|
38
|
+
_parser;
|
|
39
|
+
_connectionActive = false; // True when connected/connecting/reconnecting
|
|
40
|
+
_host = '';
|
|
41
|
+
_port = this.DEFAULT_PORT;
|
|
26
42
|
constructor(options) {
|
|
27
43
|
super();
|
|
28
|
-
this.DEFAULT_PORT = 9993;
|
|
29
|
-
this.RECONNECT_INTERVAL = 5000;
|
|
30
|
-
this.DEBUG = false;
|
|
31
|
-
this._connected = false;
|
|
32
|
-
this._retryConnectTimeout = null;
|
|
33
|
-
this._commandQueue = [];
|
|
34
|
-
this._pingPeriod = 5000;
|
|
35
|
-
this._pingInterval = null;
|
|
36
|
-
this._lastCommandTime = 0;
|
|
37
|
-
this._asyncHandlers = {};
|
|
38
|
-
this._connectionActive = false; // True when connected/connecting/reconnecting
|
|
39
|
-
this._host = '';
|
|
40
|
-
this._port = this.DEFAULT_PORT;
|
|
41
44
|
this._log = function (...args) {
|
|
42
45
|
console.log(...args);
|
|
43
46
|
};
|
|
@@ -47,8 +50,8 @@ class Hyperdeck extends EventEmitter {
|
|
|
47
50
|
if (options.pingPeriod !== undefined)
|
|
48
51
|
this._pingPeriod = options.pingPeriod;
|
|
49
52
|
}
|
|
50
|
-
this._parser = new
|
|
51
|
-
this.socket = new
|
|
53
|
+
this._parser = new MultilineParser(this.DEBUG, this._log);
|
|
54
|
+
this.socket = new Socket();
|
|
52
55
|
this.socket.setEncoding('utf8');
|
|
53
56
|
this.socket.on('error', (e) => {
|
|
54
57
|
if (this._connectionActive) {
|
|
@@ -71,7 +74,7 @@ class Hyperdeck extends EventEmitter {
|
|
|
71
74
|
const handler = new AsyncHandlers[h]();
|
|
72
75
|
this._asyncHandlers[handler.responseCode] = handler;
|
|
73
76
|
}
|
|
74
|
-
catch (
|
|
77
|
+
catch (_e) {
|
|
75
78
|
// ignore as likely not a class
|
|
76
79
|
}
|
|
77
80
|
}
|
|
@@ -94,7 +97,7 @@ class Hyperdeck extends EventEmitter {
|
|
|
94
97
|
this._retryConnectTimeout = null;
|
|
95
98
|
}
|
|
96
99
|
if (this._connected) {
|
|
97
|
-
await this.sendCommand(new
|
|
100
|
+
await this.sendCommand(new QuitCommand());
|
|
98
101
|
}
|
|
99
102
|
}
|
|
100
103
|
finally {
|
|
@@ -139,14 +142,14 @@ class Hyperdeck extends EventEmitter {
|
|
|
139
142
|
}
|
|
140
143
|
_connectInner() {
|
|
141
144
|
this._commandQueue = [];
|
|
142
|
-
this._queueCommand(new
|
|
145
|
+
this._queueCommand(new DummyConnectCommand())
|
|
143
146
|
.then(async (c) => {
|
|
144
147
|
// TODO - we can filter supported versions here. for now we shall not as it is likely that there will not be any issues
|
|
145
148
|
// if (c.protocolVersion !== 1.6) {
|
|
146
149
|
// throw new Error('unknown protocol version: ' + c.protocolVersion)
|
|
147
150
|
// }
|
|
148
151
|
if (this._pingPeriod > 0) {
|
|
149
|
-
const cmd = new
|
|
152
|
+
const cmd = new WatchdogPeriodCommand(1 + Math.round(this._pingPeriod / 1000));
|
|
150
153
|
// force the command to send
|
|
151
154
|
this._commandQueue = [];
|
|
152
155
|
const prom = this._queueCommand(cmd);
|
|
@@ -196,7 +199,7 @@ class Hyperdeck extends EventEmitter {
|
|
|
196
199
|
}
|
|
197
200
|
else {
|
|
198
201
|
this._logDebug('ping: queueing');
|
|
199
|
-
await this.sendCommand(new
|
|
202
|
+
await this.sendCommand(new PingCommand());
|
|
200
203
|
}
|
|
201
204
|
}
|
|
202
205
|
_sendQueuedCommand() {
|
|
@@ -220,7 +223,7 @@ class Hyperdeck extends EventEmitter {
|
|
|
220
223
|
const msg = command.command.serialize();
|
|
221
224
|
if (msg === null)
|
|
222
225
|
return false;
|
|
223
|
-
const cmdString =
|
|
226
|
+
const cmdString = buildMessageStr(msg);
|
|
224
227
|
this._logDebug('sending str:', cmdString);
|
|
225
228
|
try {
|
|
226
229
|
this.socket.write(cmdString);
|
|
@@ -232,7 +235,7 @@ class Hyperdeck extends EventEmitter {
|
|
|
232
235
|
try {
|
|
233
236
|
this.socket.destroy();
|
|
234
237
|
}
|
|
235
|
-
catch (
|
|
238
|
+
catch (_e2) {
|
|
236
239
|
// ignore
|
|
237
240
|
}
|
|
238
241
|
return true; // It failed, but there is no point trying to send another command
|
|
@@ -241,13 +244,13 @@ class Hyperdeck extends EventEmitter {
|
|
|
241
244
|
_handleData(data) {
|
|
242
245
|
const msgs = this._parser.receivedString(data);
|
|
243
246
|
msgs.forEach((resMsg) => {
|
|
244
|
-
const codeType =
|
|
245
|
-
if (codeType ===
|
|
247
|
+
const codeType = GetResponseCodeType(resMsg.code);
|
|
248
|
+
if (codeType === ResponseCodeType.UNKNOWN) {
|
|
246
249
|
this._log('unknown response:', resMsg);
|
|
247
250
|
return;
|
|
248
251
|
}
|
|
249
252
|
this._logDebug('res', resMsg);
|
|
250
|
-
const codeIsAsync = codeType ===
|
|
253
|
+
const codeIsAsync = codeType === ResponseCodeType.ASYNCHRONOUS;
|
|
251
254
|
if (codeIsAsync) {
|
|
252
255
|
this._handleAsyncResponse(resMsg);
|
|
253
256
|
// leave it to fall through in case the queued command is waiting for an async response
|
|
@@ -268,12 +271,13 @@ class Hyperdeck extends EventEmitter {
|
|
|
268
271
|
}
|
|
269
272
|
_handleAsyncResponse(msg) {
|
|
270
273
|
switch (msg.code) {
|
|
271
|
-
case
|
|
274
|
+
case AsynchronousCode.ConnectionInfo:
|
|
272
275
|
// Only received at startup, and handled by a command
|
|
273
276
|
return;
|
|
274
277
|
}
|
|
275
278
|
const h = this._asyncHandlers[msg.code];
|
|
276
279
|
if (h) {
|
|
280
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
|
277
281
|
this.emit(h.eventName, h.deserialize(msg));
|
|
278
282
|
}
|
|
279
283
|
else {
|
|
@@ -285,5 +289,4 @@ class Hyperdeck extends EventEmitter {
|
|
|
285
289
|
this._log(...args);
|
|
286
290
|
}
|
|
287
291
|
}
|
|
288
|
-
exports.Hyperdeck = Hyperdeck;
|
|
289
292
|
//# sourceMappingURL=hyperdeck.js.map
|