-
Notifications
You must be signed in to change notification settings - Fork 25
fix: shared control undefined state #419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 10 commits
33f9e8f
a8ee3c4
294c347
d265b78
a8a755e
cda37d5
d6eb514
457c2b0
d61c420
1fde726
a719079
7ea28d8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ import { SuperSource, TransitionSettings } from 'atem-connection/dist/state/vide | |
| import { DownstreamKeyer } from 'atem-connection/dist/state/video/downstreamKeyers' | ||
| import { UpstreamKeyer } from 'atem-connection/dist/state/video/upstreamKeyers' | ||
| import { State as DeviceState } from 'atem-state' | ||
| import { resolveUpstreamKeyerState } from 'atem-state/dist/resolvers/upstreamKeyers' | ||
| import { assertNever, deepMerge } from '../../lib' | ||
| import { AtemStateUtil } from 'atem-connection' | ||
| import * as _ from 'underscore' | ||
|
|
@@ -251,6 +252,22 @@ export function diffAddressStates(state1: AnyAddressState, state2: AnyAddressSta | |
| return true | ||
| if (state1.state.wipe && state2.state.wipe && !_.isEqual(state1.state.wipe, state2.state.wipe)) return true | ||
| return false | ||
| } else if (state1.type === AddressType.UpStreamKey && state2.type === AddressType.UpStreamKey) { | ||
| const output = resolveUpstreamKeyerState(0, [state1.state], [state2.state], { | ||
| sources: true, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this diff object the same as the one being used at the point where the command diffing happens?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I was thinking about that as well. I mostly just dropped this in because the device state and timeline state aren't strictly/deeply equal even though we should treat them as such. I don't think they have to be using the same options but equally I can't think of a reason why they shouldn't. I'll just pull it out so at least the next person is aware of the usage. |
||
| onAir: true, | ||
| type: true, | ||
| mask: true, | ||
| flyKeyframes: 'all', | ||
| flyProperties: true, | ||
| dveSettings: true, | ||
| chromaSettings: true, | ||
| advancedChromaSettings: true, | ||
| lumaSettings: true, | ||
| patternSettings: true, | ||
| }) | ||
|
|
||
| return !!output.length | ||
| } | ||
|
|
||
| return !_.isEqual(state1.state, state2.state) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.