Skip to content

Commit

Permalink
fix: convencience method for setting clip in MP
Browse files Browse the repository at this point in the history
  • Loading branch information
Balte de Wit authored and Alex Van Camp committed Sep 11, 2018
1 parent 310308b commit a8feeef
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/atem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { InputChannel } from './state/input'
import { DownstreamKeyerGeneral, DownstreamKeyerMask } from './state/video/downstreamKeyers'
import * as DT from './dataTransfer'
import { Util } from './lib/atemUtil'
import * as Enums from './enums'

export interface AtemOptions {
address?: string,
Expand Down Expand Up @@ -247,6 +248,13 @@ export class Atem extends EventEmitter {
return this.sendCommand(command)
}

setMediaPlayerSource (newProps: Partial<{ sourceType: Enums.MediaSourceType, stillIndex: number, clipIndex: number }>, player = 0) {
const command = new Commands.MediaPlayerSourceCommand()
command.mediaPlayerId = player
command.updateProps(newProps)
return this.sendCommand(command)
}

setMediaClip (index: number, name: string, frames = 1) {
const command = new Commands.MediaPoolSetClipCommand()
command.updateProps({ index, name, frames })
Expand Down

0 comments on commit a8feeef

Please sign in to comment.