atem-connection
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -5,2 +5,15 @@ # Changelog | ||
## [1.2.0](https://github.com/nrkno/tv-automation-atem-connection/compare/1.1.0...1.2.0) (2019-12-13) | ||
### Features | ||
* add listVisibleInputs method ([#57](https://github.com/nrkno/tv-automation-atem-connection/issues/57)) ([23c9318](https://github.com/nrkno/tv-automation-atem-connection/commit/23c93185fe05c4bf763aefd301717414a5ec8d88)) | ||
* expose setFadeToBlackRate ([fa974a4](https://github.com/nrkno/tv-automation-atem-connection/commit/fa974a4412344054eca0cf9950aa5943381452d7)) | ||
### Bug Fixes | ||
* add missing TVS-pro models to Model enum ([8ac6777](https://github.com/nrkno/tv-automation-atem-connection/commit/8ac67776e8a419bb41ac0e543545b73210029673)) | ||
## [1.1.0](https://github.com/nrkno/tv-automation-atem-connection/compare/1.0.2...1.1.0) (2019-10-24) | ||
@@ -7,0 +20,0 @@ |
@@ -30,3 +30,3 @@ /// <reference types="node" /> | ||
private _sentQueue; | ||
on: ((event: 'error', listener: (message: any) => void) => this) & ((event: 'connected', listener: () => void) => this) & ((event: 'disconnected', listener: () => void) => this) & ((event: 'stateChanged', listener: (state: AtemState, path: string) => void) => this); | ||
on: ((event: 'error', listener: (message: any) => void) => this) & ((event: 'connected', listener: () => void) => this) & ((event: 'disconnected', listener: () => void) => this) & ((event: 'stateChanged', listener: (state: AtemState, path: string) => void) => this) & ((event: 'receivedCommand', listener: (cmd: AbstractCommand) => void) => this); | ||
constructor(options?: AtemOptions); | ||
@@ -41,2 +41,3 @@ connect(address: string, port?: number): Promise<unknown>; | ||
fadeToBlack(me?: number): Promise<any>; | ||
setFadeToBlackRate(rate: number, me?: number): Promise<any>; | ||
autoDownstreamKey(key?: number, isTowardsOnAir?: boolean): Promise<any>; | ||
@@ -97,2 +98,3 @@ setDipTransitionSettings(newProps: Partial<DipTransitionSettings>, me?: number): Promise<any>; | ||
setAudioMixerMasterProps(props: Partial<AudioMasterChannel>): Promise<any>; | ||
listVisibleInputs(mode: 'program' | 'preview', me?: number): number[]; | ||
private _mutateState; | ||
@@ -99,0 +101,0 @@ private _resolveCommand; |
@@ -12,2 +12,3 @@ "use strict"; | ||
const exitHook = require("exit-hook"); | ||
const tally_1 = require("./lib/tally"); | ||
class Atem extends events_1.EventEmitter { | ||
@@ -43,3 +44,6 @@ constructor(options) { | ||
}); | ||
this.socket.on('receivedStateChange', (command) => this._mutateState(command)); | ||
this.socket.on('receivedStateChange', (command) => { | ||
this.emit('receivedCommand', command); | ||
this._mutateState(command); | ||
}); | ||
this.socket.on(Enums.IPCMessageType.CommandAcknowledged, ({ trackingId }) => this._resolveCommand(trackingId)); | ||
@@ -95,2 +99,8 @@ this.socket.on(Enums.IPCMessageType.CommandTimeout, ({ trackingId }) => this._rejectCommand(trackingId)); | ||
} | ||
setFadeToBlackRate(rate, me = 0) { | ||
const command = new Commands.FadeToBlackRateCommand(); | ||
command.mixEffect = me; | ||
command.properties = { rate }; | ||
return this.sendCommand(command); | ||
} | ||
autoDownstreamKey(key = 0, isTowardsOnAir) { | ||
@@ -418,2 +428,5 @@ const command = new Commands.DownstreamKeyAutoCommand(); | ||
} | ||
listVisibleInputs(mode, me = 0) { | ||
return tally_1.listVisibleInputs(mode, this.state, me); | ||
} | ||
_mutateState(command) { | ||
@@ -420,0 +433,0 @@ if (typeof command.applyToState === 'function') { |
@@ -16,1 +16,2 @@ import AbstractCommand from './AbstractCommand'; | ||
export * from './PowerStatusCommand'; | ||
export * from './TallyBySourceCommand'; |
@@ -19,2 +19,3 @@ "use strict"; | ||
tslib_1.__exportStar(require("./PowerStatusCommand"), exports); | ||
tslib_1.__exportStar(require("./TallyBySourceCommand"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -11,2 +11,4 @@ export declare enum Model { | ||
TVSHD = 8, | ||
TVSProHD = 9, | ||
TVSPro4K = 10, | ||
Constellation = 11, | ||
@@ -13,0 +15,0 @@ Constellation8K = 12 |
@@ -14,2 +14,4 @@ "use strict"; | ||
Model[Model["TVSHD"] = 8] = "TVSHD"; | ||
Model[Model["TVSProHD"] = 9] = "TVSProHD"; | ||
Model[Model["TVSPro4K"] = 10] = "TVSPro4K"; | ||
Model[Model["Constellation"] = 11] = "Constellation"; | ||
@@ -16,0 +18,0 @@ Model[Model["Constellation8K"] = 12] = "Constellation8K"; |
@@ -11,7 +11,2 @@ import { DeviceInfo } from './info'; | ||
video: AtemVideoState; | ||
channels: Array<{ | ||
name: string; | ||
label: string; | ||
}>; | ||
tallies: Array<number>; | ||
audio: AtemAudioState; | ||
@@ -18,0 +13,0 @@ media: MediaState; |
@@ -13,4 +13,2 @@ "use strict"; | ||
this.video = new video_1.AtemVideoState(); | ||
this.channels = []; | ||
this.tallies = []; | ||
this.audio = new audio_1.AtemAudioState(); | ||
@@ -17,0 +15,0 @@ this.media = new media_1.MediaState(); |
{ | ||
"name": "atem-connection", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Typescript Node.js library for connecting with an ATEM switcher.", | ||
@@ -74,5 +74,12 @@ "main": "dist/index.js", | ||
}, | ||
"files": [ | ||
"/dist", | ||
"/CHANGELOG.md", | ||
"/README.md", | ||
"/LICENSE" | ||
], | ||
"devDependencies": { | ||
"@types/jest": "^24.0.11", | ||
"@types/node": "^12.7.12", | ||
"class-transformer": "^0.2.3", | ||
"codecov": "^3.2.0", | ||
@@ -95,3 +102,3 @@ "gh-pages": "^2.0.1", | ||
"typedoc": "^0.15.0", | ||
"typescript": "^3.3.4000" | ||
"typescript": "~3.6.4" | ||
}, | ||
@@ -98,0 +105,0 @@ "keywords": [ |
@@ -74,2 +74,6 @@ # Sofie: The Modern TV News Studio Automation System (ATEM connection library) | ||
- `receivedCommand(command)` | ||
Whenever a packet from the ATEM is received that contains a command, this event will be fired. | ||
This should not be relied on in most usage, as the commands can and will have breaking changes in patch releases. This event is needed for some use cases, so if this is used you should likely pin the version down to a specific patch release to ensure nothing breaks. | ||
## Debug | ||
@@ -76,0 +80,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
504860
349
7454
99
21