atem-state
Advanced tools
Comparing version 0.8.2-nightly-20200207-130843-bef547f.0 to 0.8.2-nightly-20200217-203926-129121d.0
@@ -6,2 +6,3 @@ import { VideoState } from 'atem-connection'; | ||
import { MacroPlayerState } from 'atem-connection/dist/state/macro'; | ||
import { MediaPlayer, MediaPlayerSource } from 'atem-connection/dist/state/media'; | ||
export declare namespace Defaults { | ||
@@ -11,2 +12,3 @@ namespace Video { | ||
const defaultRate = 25; | ||
const MediaPlayer: MediaPlayer & MediaPlayerSource; | ||
const MacroPlayer: MacroPlayerState; | ||
@@ -13,0 +15,0 @@ const DownStreamKeyer: DSK.DownstreamKeyer; |
@@ -10,2 +10,11 @@ "use strict"; | ||
Video.defaultRate = 25; // 1 second | ||
Video.MediaPlayer = { | ||
clipIndex: 0, | ||
stillIndex: 0, | ||
sourceType: atem_connection_1.Enums.MediaSourceType.Still, | ||
loop: false, | ||
playing: false, | ||
atBeginning: false, | ||
clipFrame: 0 | ||
}; | ||
Video.MacroPlayer = { | ||
@@ -12,0 +21,0 @@ macroIndex: 0, |
@@ -9,2 +9,3 @@ "use strict"; | ||
const macro_1 = require("./macro"); | ||
const media_1 = require("./media"); | ||
function videoState(oldState, newState, version) { | ||
@@ -17,2 +18,3 @@ let commands = []; | ||
commands = commands.concat(audio_1.resolveAudioState(oldState, newState)); | ||
commands = commands.concat(media_1.resolveMediaPlayerState(oldState, newState)); | ||
// resolve auxilliaries: | ||
@@ -19,0 +21,0 @@ for (const index in newState.video.auxilliaries) { |
@@ -7,11 +7,20 @@ "use strict"; | ||
const commands = []; | ||
for (const index in newState.media.players) { | ||
const newPlayer = newState.media.players[index]; | ||
const oldPlayer = oldState.media.players[index]; | ||
const props = util_1.diffObject(oldPlayer, newPlayer); | ||
if (props) { | ||
const command = new atem_connection_1.Commands.MediaPlayerStatusCommand(); | ||
command.mediaPlayerId = Number(index); | ||
command.updateProps(props); | ||
commands.push(command); | ||
if (newState.media && newState.media.players) { | ||
for (const index in newState.media.players) { | ||
const newPlayer = newState.media.players[index]; | ||
const oldPlayer = oldState.media.players[index]; | ||
const props = util_1.diffObject(oldPlayer, newPlayer); | ||
if (props) { | ||
const command = new atem_connection_1.Commands.MediaPlayerStatusCommand(); | ||
command.mediaPlayerId = Number(index); | ||
command.updateProps(props); | ||
commands.push(command); | ||
} | ||
const srcProps = util_1.diffObject(oldPlayer, newPlayer); | ||
if (srcProps) { | ||
const command = new atem_connection_1.Commands.MediaPlayerSourceCommand(); | ||
command.mediaPlayerId = Number(index); | ||
command.updateProps(srcProps); | ||
commands.push(command); | ||
} | ||
} | ||
@@ -18,0 +27,0 @@ } |
{ | ||
"name": "atem-state", | ||
"version": "0.8.2-nightly-20200207-130843-bef547f.0", | ||
"version": "0.8.2-nightly-20200217-203926-129121d.0", | ||
"description": "Typescript Node.js library for comparing ATEM states", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
110471
1251