-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update atem-connection and atem-state SOFIE-2504 (#289)
- Loading branch information
Showing
15 changed files
with
459 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
packages/timeline-state-resolver/src/__mocks__/atem-connection.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
export * from 'atem-connection' | ||
import * as OrigAtemConnection from 'atem-connection' | ||
import { EventEmitter } from 'events' | ||
|
||
const setTimeoutOrg = setTimeout | ||
|
||
// @ts-ignore separate declarations | ||
export class BasicAtem extends EventEmitter implements OrigAtemConnection.BasicAtem { | ||
constructor(_options?: OrigAtemConnection.AtemOptions) { | ||
super() | ||
} | ||
get state(): OrigAtemConnection.AtemState { | ||
return OrigAtemConnection.AtemStateUtil.Create() | ||
} | ||
async connect(): Promise<void> { | ||
setTimeoutOrg(() => { | ||
this.emit('connected') | ||
}, 10) | ||
|
||
return new Promise<void>((resolve) => { | ||
setTimeoutOrg(() => { | ||
resolve() | ||
}, 5) | ||
}) | ||
} | ||
async disconnect(): Promise<void> { | ||
return new Promise<void>((resolve) => { | ||
setTimeoutOrg(() => { | ||
resolve() | ||
}, 10) | ||
}) | ||
} | ||
|
||
async destroy(): Promise<void> { | ||
return new Promise<void>((resolve) => { | ||
setTimeoutOrg(() => { | ||
resolve() | ||
}, 10) | ||
}) | ||
} | ||
|
||
async sendCommand(): Promise<void> { | ||
return Promise.resolve() | ||
} | ||
} |
49 changes: 0 additions & 49 deletions
49
packages/timeline-state-resolver/src/__mocks__/atem-state.ts
This file was deleted.
Oops, something went wrong.
74 changes: 74 additions & 0 deletions
74
...line-state-resolver/src/integrations/atem/__tests__/__snapshots__/diffStates.spec.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Diff States Simple diff against empty state 1`] = ` | ||
{ | ||
"audio": { | ||
"classic": undefined, | ||
"fairlight": { | ||
"audioRouting": { | ||
"outputs": { | ||
"default": undefined, | ||
}, | ||
"sources": undefined, | ||
}, | ||
"crossfade": undefined, | ||
"inputs": undefined, | ||
"masterOutput": undefined, | ||
"monitorOutput": undefined, | ||
}, | ||
}, | ||
"colorGenerators": undefined, | ||
"macros": { | ||
"player": { | ||
"player": true, | ||
}, | ||
}, | ||
"media": { | ||
"players": { | ||
"source": true, | ||
"status": true, | ||
}, | ||
}, | ||
"settings": { | ||
"multiviewer": undefined, | ||
}, | ||
"video": { | ||
"auxiliaries": [], | ||
"downstreamKeyers": { | ||
"mask": true, | ||
"onAir": true, | ||
"properties": true, | ||
"sources": true, | ||
}, | ||
"mixEffects": { | ||
"programPreview": true, | ||
"transitionProperties": true, | ||
"transitionSettings": { | ||
"DVE": false, | ||
"dip": false, | ||
"mix": true, | ||
"stinger": false, | ||
"wipe": true, | ||
}, | ||
"transitionStatus": true, | ||
"upstreamKeyers": { | ||
"advancedChromaSettings": false, | ||
"chromaSettings": false, | ||
"dveSettings": true, | ||
"flyKeyframes": undefined, | ||
"lumaSettings": true, | ||
"mask": true, | ||
"onAir": true, | ||
"patternSettings": true, | ||
"sources": true, | ||
"type": true, | ||
}, | ||
}, | ||
"superSources": { | ||
"border": true, | ||
"boxes": "all", | ||
"properties": true, | ||
}, | ||
}, | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.