From 79852f064c8914a90e469b4a95f0d4be02491f25 Mon Sep 17 00:00:00 2001 From: Jan Willem Kolkman Date: Sat, 18 Nov 2017 16:31:47 +0100 Subject: [PATCH] added blank parameter --- index.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index b9f0663..ed7e9c3 100644 --- a/index.js +++ b/index.js @@ -15,7 +15,7 @@ let ALLOWED_OUTPUTS = ['hdmi', 'local', 'both', 'alsa']; // ----- Functions ----- // // Creates an array of arguments to pass to omxplayer. -function buildArgs (source, givenOutput, loop, initialVolume, showOsd) { +function buildArgs (source, givenOutput, loop, initialVolume, showOsd, showBlank) { let output = ''; if (givenOutput) { @@ -35,7 +35,12 @@ function buildArgs (source, givenOutput, loop, initialVolume, showOsd) { osd = showOsd; } - let args = [source, '-o', output, '--blank', osd ? '' : '--no-osd']; + let blank = true; + if(!showBlank) { + blank = false; + } + + let args = [source, '-o', output, blank ? '--blank' : '', osd ? '' : '--no-osd']; // Handle the loop argument, if provided if (loop) {