Skip to content

Commit

Permalink
#45 added file format variables
Browse files Browse the repository at this point in the history
  • Loading branch information
sphlabs committed Jan 27, 2022
1 parent 7b63221 commit 3da0116
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions variables.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,15 @@ module.exports.updateTimecodeVariables = function (instance) {
setTcVariable(false, countUp), setTcVariable(true, countDown)
}

module.exports.updateConfigurationVariables = function (instance) {
if (instance.deckConfig.fileFormat !== '') {
const format = instance.CONFIG_FILEFORMATS.find(({id}) => id === instance.deckConfig['fileFormat'])
if (format !== undefined) {
instance.setVariable('fileFormat', format.label)
}
}
}

module.exports.initVariables = function (instance) {
var variables = []

Expand Down Expand Up @@ -243,6 +252,13 @@ module.exports.initVariables = function (instance) {
name: (isCountdown ? 'countdownT' : 't') + 'imecodeF',
})
}

// Configuration variables
variables.push({
label: 'File format',
name: 'fileFormat',
})
module.exports.updateConfigurationVariables(instance)

initTcVariable(false)
initTcVariable(true)
Expand Down

0 comments on commit 3da0116

Please sign in to comment.