Skip to content

Commit

Permalink
fix(OBS): incompatible/outdated OBS DeviceOptions topology
Browse files Browse the repository at this point in the history
  • Loading branch information
jstarpl committed Jul 12, 2021
1 parent 6628ed0 commit c83cd7b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/timeline-state-resolver/src/devices/obs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ function deepExtend<T>(destination: T, ...sources: any[]) {
return _.deepExtend(destination, ...sources)
}
export interface DeviceOptionsOBSInternal extends DeviceOptionsOBS {
options: DeviceOptionsOBS['options'] & {
commandReceiver?: CommandReceiver
}
commandReceiver?: CommandReceiver
}
export type CommandReceiver = (
time: number,
Expand Down Expand Up @@ -77,9 +75,7 @@ export class OBSDevice extends DeviceWithState<OBSState, DeviceOptionsOBSInterna
constructor(deviceId: string, deviceOptions: DeviceOptionsOBSInternal, options) {
super(deviceId, deviceOptions, options)
if (deviceOptions.options) {
if (deviceOptions.options.commandReceiver) {
this._commandReceiver = deviceOptions.options.commandReceiver
} else this._commandReceiver = this._defaultCommandReceiver
this._commandReceiver = deviceOptions.commandReceiver ?? this._defaultCommandReceiver
}
this._doOnTime = new DoOnTime(
() => {
Expand Down

0 comments on commit c83cd7b

Please sign in to comment.