Skip to content

Commit

Permalink
fix: transport info changes properties are nowoptional
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Oct 11, 2018
1 parent 695acbb commit 83815ab
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/commands/transportInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ export class TransportInfoCommand extends AbstractCommandBase<TransportInfoComma
}

export interface TransportInfoChangeResponse {
Status: TransportStatus | undefined
Speed: number | undefined
SlotId: SlotId | null | undefined
ClipId: number | null | undefined
SingleClip: boolean | undefined
DisplayTimecode: string | undefined
Timecode: string | undefined
VideoFormat: VideoFormat | undefined
Loop: boolean | undefined
Status?: TransportStatus
Speed?: number
SlotId?: SlotId | null
ClipId?: number | null
SingleClip?: boolean
DisplayTimecode?: string
Timecode?: string
VideoFormat?: VideoFormat
Loop?: boolean
}

export class TransportInfoChange {
Expand Down
3 changes: 3 additions & 0 deletions src/hyperdeck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ export class Hyperdeck extends EventEmitter {
private _handleAsyncResponse (msg: ResponseMessage) {
// TODO - refactor to pick the handler dynamically
switch (msg.Code) {
case AsynchronousCode.ConnectionInfo:
// Only received at startup, and handled by a command
break
case AsynchronousCode.TransportInfo:
const handler = new TransportInfoChange()
const r = handler.deserialize(msg)
Expand Down

0 comments on commit 83815ab

Please sign in to comment.