atem-connection
Advanced tools
Comparing version 0.8.1 to 0.8.2
@@ -5,2 +5,12 @@ # Change Log | ||
<a name="0.8.2"></a> | ||
## [0.8.2](https://github.com/nrkno/tv-automation-atem-connection/compare/0.8.1...0.8.2) (2019-01-19) | ||
### Bug Fixes | ||
* one object per multiviewer in the state ([5f53526](https://github.com/nrkno/tv-automation-atem-connection/commit/5f53526)) | ||
<a name="0.8.1"></a> | ||
@@ -7,0 +17,0 @@ ## [0.8.1](https://github.com/nrkno/tv-automation-atem-connection/compare/0.8.0...0.8.1) (2018-11-26) |
@@ -6,2 +6,3 @@ /// <reference types="node" /> | ||
import { MediaPlayer } from './state/media'; | ||
import { MultiViewerSourceState } from './state/settings'; | ||
import { DipTransitionSettings, DVETransitionSettings, MixTransitionSettings, StingerTransitionSettings, SuperSourceBox, TransitionProperties, WipeTransitionSettings, SuperSourceProperties } from './state/video'; | ||
@@ -54,3 +55,9 @@ import * as USK from './state/video/upstreamKeyers'; | ||
setDownstreamKeyRate(rate: number, key?: number): Promise<any>; | ||
macroContinue(): Promise<any>; | ||
macroDelete(index?: number): Promise<any>; | ||
macroInsertUserWait(): Promise<any>; | ||
macroRun(index?: number): Promise<any>; | ||
macroStop(): Promise<any>; | ||
macroStopRecord(): Promise<any>; | ||
setMultiViewerSource(newProps: Partial<MultiViewerSourceState>, mv?: number): Promise<any>; | ||
setMediaPlayerSettings(newProps: Partial<MediaPlayer>, player?: number): Promise<any>; | ||
@@ -80,5 +87,5 @@ setMediaPlayerSource(newProps: Partial<{ | ||
uploadAudio(index: number, data: Buffer, name: string): Promise<{}>; | ||
private _mutateState(command); | ||
private _resolveCommand(trackingId); | ||
private _rejectCommand(trackingId); | ||
private _mutateState; | ||
private _resolveCommand; | ||
private _rejectCommand; | ||
} |
@@ -180,2 +180,20 @@ "use strict"; | ||
} | ||
macroContinue() { | ||
const command = new Commands.MacroActionCommand(); | ||
command.index = 0; | ||
command.updateProps({ action: enums_1.MacroAction.Continue }); | ||
return this.sendCommand(command); | ||
} | ||
macroDelete(index = 0) { | ||
const command = new Commands.MacroActionCommand(); | ||
command.index = index; | ||
command.updateProps({ action: enums_1.MacroAction.Delete }); | ||
return this.sendCommand(command); | ||
} | ||
macroInsertUserWait() { | ||
const command = new Commands.MacroActionCommand(); | ||
command.index = 0; | ||
command.updateProps({ action: enums_1.MacroAction.InsertUserWait }); | ||
return this.sendCommand(command); | ||
} | ||
macroRun(index = 0) { | ||
@@ -187,2 +205,20 @@ const command = new Commands.MacroActionCommand(); | ||
} | ||
macroStop() { | ||
const command = new Commands.MacroActionCommand(); | ||
command.index = 0; | ||
command.updateProps({ action: enums_1.MacroAction.Stop }); | ||
return this.sendCommand(command); | ||
} | ||
macroStopRecord() { | ||
const command = new Commands.MacroActionCommand(); | ||
command.index = 0; | ||
command.updateProps({ action: enums_1.MacroAction.StopRecord }); | ||
return this.sendCommand(command); | ||
} | ||
setMultiViewerSource(newProps, mv = 0) { | ||
const command = new Commands.MultiViewerSourceCommand(); | ||
command.multiViewerId = mv; | ||
command.updateProps(newProps); | ||
return this.sendCommand(command); | ||
} | ||
setMediaPlayerSettings(newProps, player = 0) { | ||
@@ -189,0 +225,0 @@ const command = new Commands.MediaPlayerStatusCommand(); |
export * from './MacroActionCommand'; | ||
export * from './MacroPropertiesCommand'; | ||
export * from './MacroRecordingStatusCommand'; | ||
export * from './MacroRunStatusCommand'; |
@@ -5,3 +5,5 @@ "use strict"; | ||
tslib_1.__exportStar(require("./MacroActionCommand"), exports); | ||
tslib_1.__exportStar(require("./MacroPropertiesCommand"), exports); | ||
tslib_1.__exportStar(require("./MacroRecordingStatusCommand"), exports); | ||
tslib_1.__exportStar(require("./MacroRunStatusCommand"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -22,2 +22,9 @@ "use strict"; | ||
break; | ||
case enums_1.MacroAction.Stop: | ||
case enums_1.MacroAction.StopRecord: | ||
case enums_1.MacroAction.InsertUserWait: | ||
case enums_1.MacroAction.Continue: | ||
buffer[4] = 0xff; | ||
buffer[5] = 0xff; | ||
break; | ||
default: | ||
@@ -24,0 +31,0 @@ break; |
/// <reference types="node" /> | ||
import AbstractCommand from '../AbstractCommand'; | ||
import { AtemState } from '../../state'; | ||
import { MacroPlayerState } from '../../state/macro'; | ||
export declare class MacroRunStatusCommand extends AbstractCommand { | ||
rawName: string; | ||
properties: { | ||
isRunning: boolean; | ||
isWaiting: boolean; | ||
loop: boolean; | ||
macroIndex: number; | ||
}; | ||
macroIndexID: number; | ||
properties: MacroPlayerState; | ||
deserialize(rawCommand: Buffer): void; | ||
applyToState(state: AtemState): void; | ||
} |
@@ -10,2 +10,3 @@ "use strict"; | ||
deserialize(rawCommand) { | ||
this.macroIndexID = rawCommand.readUInt16BE(2); | ||
this.properties = { | ||
@@ -15,7 +16,7 @@ isRunning: Boolean(rawCommand[0] & 1 << 0), | ||
loop: Boolean(rawCommand[1] & 1 << 0), | ||
macroIndex: rawCommand.readUInt16BE(2) | ||
macroIndex: this.macroIndexID | ||
}; | ||
} | ||
applyToState(state) { | ||
state.macroPlayer = Object.assign({}, state.macroPlayer, this.properties); | ||
state.macro.macroPlayer = Object.assign({}, state.macro.macroPlayer, this.properties); | ||
} | ||
@@ -22,0 +23,0 @@ } |
@@ -0,1 +1,2 @@ | ||
export * from './MultiViewerSourceCommand'; | ||
export * from './VideoMode'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const tslib_1 = require("tslib"); | ||
tslib_1.__exportStar(require("./MultiViewerSourceCommand"), exports); | ||
tslib_1.__exportStar(require("./VideoMode"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -57,3 +57,3 @@ "use strict"; | ||
} | ||
else { | ||
else { // unlock | ||
this._releaseLock(); | ||
@@ -65,3 +65,3 @@ } | ||
switch (code) { | ||
case 1:// Probably means "retry". | ||
case 1: // Probably means "retry". | ||
if (this.transfer instanceof dataTransferClip_1.default) { | ||
@@ -68,0 +68,0 @@ // Retry the last frame. |
@@ -9,3 +9,3 @@ export declare enum Model { | ||
TwoMEBS4K = 7, | ||
TVSHD = 8, | ||
TVSHD = 8 | ||
} | ||
@@ -17,3 +17,3 @@ export declare enum TransitionStyle { | ||
DVE = 3, | ||
STING = 4, | ||
STING = 4 | ||
} | ||
@@ -23,3 +23,3 @@ export declare enum TallyState { | ||
Program = 1, | ||
Preview = 2, | ||
Preview = 2 | ||
} | ||
@@ -30,3 +30,3 @@ export declare enum ConnectionState { | ||
Established = 2, | ||
Closed = 3, | ||
Closed = 3 | ||
} | ||
@@ -38,3 +38,3 @@ export declare enum PacketFlag { | ||
Error = 8, | ||
AckReply = 16, | ||
AckReply = 16 | ||
} | ||
@@ -76,3 +76,3 @@ export declare enum DVEEffect { | ||
GraphicCCWSpin = 33, | ||
GraphicLogoWipe = 34, | ||
GraphicLogoWipe = 34 | ||
} | ||
@@ -85,3 +85,3 @@ export declare enum MacroAction { | ||
Continue = 4, | ||
Delete = 5, | ||
Delete = 5 | ||
} | ||
@@ -95,3 +95,3 @@ export declare enum ExternalPorts { | ||
SVideo = 16, | ||
All = 31, | ||
All = 31 | ||
} | ||
@@ -104,3 +104,3 @@ export declare enum ExternalPortType { | ||
Component = 4, | ||
SVideo = 5, | ||
SVideo = 5 | ||
} | ||
@@ -117,3 +117,3 @@ export declare enum InternalPortType { | ||
Auxiliary = 129, | ||
Mask = 130, | ||
Mask = 130 | ||
} | ||
@@ -127,3 +127,3 @@ export declare enum SourceAvailability { | ||
KeySource = 16, | ||
All = 31, | ||
All = 31 | ||
} | ||
@@ -134,3 +134,3 @@ export declare enum MeAvailability { | ||
Me2 = 2, | ||
All = 3, | ||
All = 3 | ||
} | ||
@@ -141,3 +141,3 @@ export declare enum BorderBevel { | ||
In = 2, | ||
Out = 3, | ||
Out = 3 | ||
} | ||
@@ -148,3 +148,3 @@ export declare enum IsAtKeyFrame { | ||
B = 2, | ||
RunToInfinite = 4, | ||
RunToInfinite = 4 | ||
} | ||
@@ -169,3 +169,3 @@ export declare enum Pattern { | ||
TopLeftDiagonal = 16, | ||
TopRightDiagonal = 17, | ||
TopRightDiagonal = 17 | ||
} | ||
@@ -176,7 +176,7 @@ export declare enum MixEffectKeyType { | ||
Pattern = 2, | ||
DVE = 3, | ||
DVE = 3 | ||
} | ||
export declare enum SuperSourceArtOption { | ||
Background = 0, | ||
Foreground = 1, | ||
Foreground = 1 | ||
} | ||
@@ -190,3 +190,3 @@ export declare enum IPCMessageType { | ||
CommandAcknowledged = "commandAcknowledged", | ||
CommandTimeout = "commandTimeout", | ||
CommandTimeout = "commandTimeout" | ||
} | ||
@@ -197,3 +197,3 @@ export declare enum TransferMode { | ||
Clear = 2, | ||
WriteAudio = 256, | ||
WriteAudio = 256 | ||
} | ||
@@ -205,3 +205,3 @@ export declare enum StoragePool { | ||
Audio1 = 3, | ||
Audio2 = 4, | ||
Audio2 = 4 | ||
} | ||
@@ -228,3 +228,3 @@ export declare enum VideoMode { | ||
P4KHDp5000 = 18, | ||
N4KHDp5994 = 19, | ||
N4KHDp5994 = 19 | ||
} | ||
@@ -235,7 +235,13 @@ export declare enum TransferState { | ||
Transferring = 2, | ||
Finished = 3, | ||
Finished = 3 | ||
} | ||
export declare enum MediaSourceType { | ||
Still = 1, | ||
Clip = 2, | ||
Clip = 2 | ||
} | ||
export declare enum MultiViewerLayout { | ||
Top = 0, | ||
Bottom = 1, | ||
Left = 2, | ||
Right = 3 | ||
} |
@@ -246,2 +246,9 @@ "use strict"; | ||
})(MediaSourceType = exports.MediaSourceType || (exports.MediaSourceType = {})); | ||
var MultiViewerLayout; | ||
(function (MultiViewerLayout) { | ||
MultiViewerLayout[MultiViewerLayout["Top"] = 0] = "Top"; | ||
MultiViewerLayout[MultiViewerLayout["Bottom"] = 1] = "Bottom"; | ||
MultiViewerLayout[MultiViewerLayout["Left"] = 2] = "Left"; | ||
MultiViewerLayout[MultiViewerLayout["Right"] = 3] = "Right"; | ||
})(MultiViewerLayout = exports.MultiViewerLayout || (exports.MultiViewerLayout = {})); | ||
//# sourceMappingURL=index.js.map |
@@ -12,2 +12,4 @@ export * from './atem'; | ||
import * as InputState from './state/input'; | ||
export { VideoState, AudioState, MediaState, InfoState, InputState }; | ||
import * as MacroState from './state/macro'; | ||
import * as SettingsState from './state/settings'; | ||
export { VideoState, AudioState, MediaState, InfoState, InputState, MacroState, SettingsState }; |
@@ -22,2 +22,6 @@ "use strict"; | ||
exports.InputState = InputState; | ||
const MacroState = require("./state/macro"); | ||
exports.MacroState = MacroState; | ||
const SettingsState = require("./state/settings"); | ||
exports.SettingsState = SettingsState; | ||
//# sourceMappingURL=index.js.map |
@@ -23,6 +23,6 @@ /// <reference types="node" /> | ||
_sendCommand(command: AbstractCommand, trackingId: number): Promise<{}>; | ||
private _createSocketProcess(); | ||
private _sendSubprocessMessage(message); | ||
private _receiveSubprocessMessage(message); | ||
private _parseCommand(buffer, packetId?); | ||
private _createSocketProcess; | ||
private _sendSubprocessMessage; | ||
private _receiveSubprocessMessage; | ||
private _parseCommand; | ||
} |
@@ -33,8 +33,8 @@ /// <reference types="node" /> | ||
_sendCommand(serializedCommand: Buffer, trackingId: number): void; | ||
private _createSocket(); | ||
private _receivePacket(packet, rinfo); | ||
private _sendPacket(packet); | ||
private _attemptAck(packetId); | ||
private _sendAck(packetId); | ||
private _checkForRetransmit(); | ||
private _createSocket; | ||
private _receivePacket; | ||
private _sendPacket; | ||
private _attemptAck; | ||
private _sendAck; | ||
private _checkForRetransmit; | ||
} |
@@ -6,8 +6,6 @@ import { DeviceInfo } from './info'; | ||
import { InputChannel } from './input'; | ||
import { MacroPlayerState } from './macroPlayer'; | ||
import { MacroState } from './macro'; | ||
import { SettingsState } from './settings'; | ||
export declare class AtemState { | ||
info: DeviceInfo; | ||
settings: { | ||
videoMode: number; | ||
}; | ||
video: AtemVideoState; | ||
@@ -22,3 +20,4 @@ channels: Array<{ | ||
inputs: Array<InputChannel>; | ||
macroPlayer: MacroPlayerState; | ||
macro: MacroState; | ||
settings: SettingsState; | ||
} |
@@ -7,8 +7,7 @@ "use strict"; | ||
const media_1 = require("./media"); | ||
const macro_1 = require("./macro"); | ||
const settings_1 = require("./settings"); | ||
class AtemState { | ||
constructor() { | ||
this.info = new info_1.DeviceInfo(); | ||
this.settings = { | ||
videoMode: 0 | ||
}; | ||
this.video = new video_1.AtemVideoState(); | ||
@@ -20,2 +19,4 @@ this.channels = []; | ||
this.inputs = []; | ||
this.macro = new macro_1.MacroState(); | ||
this.settings = new settings_1.SettingsState(); | ||
} | ||
@@ -22,0 +23,0 @@ } |
{ | ||
"name": "atem-connection", | ||
"version": "0.8.1", | ||
"version": "0.8.2", | ||
"description": "Typescript Node.js library for connecting with an ATEM switcher.", | ||
@@ -47,3 +47,3 @@ "main": "dist/index.js", | ||
"ci": "yarn test && yarn docs:test", | ||
"validate:dependencies": "nsp check && yarn license-validate", | ||
"validate:dependencies": "yarn audit && yarn license-validate", | ||
"license-validate": "node-license-validator -p -d --allow-licenses MIT BSD BSD-3-Clause ISC Apache" | ||
@@ -82,3 +82,3 @@ }, | ||
"@types/p-retry": "^2.0.0", | ||
"codecov": "^2.2.0", | ||
"codecov": "3.1.0", | ||
"cpx": "^1.5.0", | ||
@@ -90,3 +90,2 @@ "gh-pages": "^1.0.0", | ||
"npm-scripts-info": "^0.3.6", | ||
"nsp": "^3.2.1", | ||
"nyc": "^11.0.3", | ||
@@ -93,0 +92,0 @@ "opn-cli": "^3.1.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
416285
21
322
6206