case-insensitive commands, ttas vods, start/stop delay support
This commit is contained in:
@@ -22,10 +22,15 @@ function FGFM(config) {
|
||||
// @TODO: Move these defaults to config
|
||||
if (typeof streamStartDelaySeconds === 'undefined') {
|
||||
streamStartDelaySeconds = 1;
|
||||
} else {
|
||||
streamStartDelaySeconds = parseInt(streamStartDelaySeconds);
|
||||
}
|
||||
|
||||
if (typeof showStartDelaySeconds === 'undefined') {
|
||||
showStartDelaySeconds = 300;
|
||||
} else {
|
||||
showStartDelaySeconds = parseInt(showStartDelaySeconds);
|
||||
showStartDelaySeconds += streamStartDelaySeconds;
|
||||
}
|
||||
|
||||
this.state.showStatus = 'STARTING_SOON';
|
||||
@@ -39,10 +44,11 @@ function FGFM(config) {
|
||||
// Restore volume
|
||||
this.obs.setVolume('headphones', 1.0);
|
||||
|
||||
// Start the stream
|
||||
// Start the stream after delay
|
||||
console.log(`The stream will start in ${streamStartDelaySeconds} seconds!`);
|
||||
setTimeout(() => {this.obs.startStream().then(() => {this.emit('STREAM_STARTED')})}, streamStartDelaySeconds*1000);
|
||||
|
||||
// Start the "show" after stream+show delay
|
||||
// @TODO: Actually show the countdown in the scene
|
||||
console.log(`The show will start in ${showStartDelaySeconds} seconds!`);
|
||||
setTimeout(this.startTheShow, showStartDelaySeconds*1000);
|
||||
|
||||
Reference in New Issue
Block a user