Skip to content

Commit

Permalink
Merge pull request #21 from jrviz/master
Browse files Browse the repository at this point in the history
Added upper case text option to align when using ProPresenter upper case theme
  • Loading branch information
jrviz authored Feb 23, 2022
2 parents d58fa35 + 1770be8 commit c91ddbf
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 34 deletions.
1 change: 1 addition & 0 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module.exports = new Store({
propresenterPort: '49610',
propresenterPassword: '',
switch_PPimages: false,
switch_PPUCase: false,
presentationbridgeHost: '',
presentationbridgePort: '80',
presentationbridgeID: '',
Expand Down
12 changes: 9 additions & 3 deletions help.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@

This software is designed to work with your presentation lyrics software, accessing slide data in real time and then performing custom actions. It integrates with PresentationBridge, a free server program that allows you to send lyric data to end devices such as phones, tablets, and tv sticks through the built in web browser on those devices.

THe Settings window is used to configure the software for ProPresenter, PresentationBridge, midi-relay, Vista, Companion and HTTP.
The Settings window is used to configure the software for ProPresenter, PresentationBridge, midi-relay, Vista, Companion and HTTP.

Text on slides is sent to the bridge for display on devices that are connected. Images of the slides will be sent if the 'Send Images' switch in settings is on. The stage display shows the slide text and notes for both the current slide and next.
Text on slides is sent to the bridge for display on devices that are connected.

Text will be converted to upper case if the 'Upper Case' switch is set. This is used to match text display if a ProPresenter upper case theme is being used.

Images of the slides will be sent if the 'Send Images' switch in settings is on.

The stage display shows the slide text and notes for both the current slide and next.

In addition, using the notes section of a slide, this Client can also send commands using midi-relay, HTTP and Companion:
* Send MIDI voice messages, using the free program [midi-relay](http://github.com/josephdadams/midi-relay)
Expand Down Expand Up @@ -181,4 +187,4 @@ Format: `logo:[switch];`

* `switch`: Either `on` or `off`

Example: `logo:on;` : To turn the logo on.
Example: `logo:on;` : To turn the logo on.
42 changes: 25 additions & 17 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@
$('#divTopLine').html(' v' + package_json.version)

$('#switchPPimages').prop('checked', config.get('switch_PPimages'));
$('#switchPPUCase').prop('checked', config.get('switch_PPUCase'));
$('#txtProPresenterIP').val(config.get('propresenterIP'));
$('#txtProPresenterPort').val(config.get('propresenterPort'));
$('#txtProPresenterPassword').val(config.get('propresenterPassword'));
Expand Down Expand Up @@ -354,6 +355,9 @@
case 'PPimages':
enable = $('#switchPPimages').prop('checked');
break;
case 'PPUCase':
enable = $('#switchPPUCase').prop('checked');
break;
default:
break;
}
Expand Down Expand Up @@ -395,15 +399,9 @@ <h2>Created by <a href="#" onclick="openAuthor();">techministry.blog</a></h2><h3
<div class='form-group col-md-2'>
<b>ProPresenter:</b>
</div>
<div class='form-group col-md-7'>
<div class='form-group col-md-10'>
<div id='divProPresenterStatus'></div>
</div>
<div class='form-group col-md-3'>
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="switchPPimages" onClick="switch_enable('PPimages');">
<label class="custom-control-label" for="switchPPimages"><b>Send Images</b></label>
</div>
</div>
</div>
<div class='form-row'>
<div class='form-group col-md-4'>
Expand Down Expand Up @@ -439,6 +437,20 @@ <h2>Created by <a href="#" onclick="openAuthor();">techministry.blog</a></h2><h3
<div id='divProPresenterHosts'></div>
</div>
</div>
<div class='form-row'>
<div class='form-group col-md-3'>
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="switchPPimages" onClick="switch_enable('PPimages');">
<label class="custom-control-label" for="switchPPimages"><b>Send Images</b></label>
</div>
</div>
<div class='form-group col-md-3'>
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="switchPPUCase" onClick="switch_enable('PPUCase');">
<label class="custom-control-label" for="switchPPUCase"><b>Upper Case</b></label>
</div>
</div>
</div>
</section>
<section>
<div class='horizontal-line'></div>
Expand Down Expand Up @@ -489,7 +501,6 @@ <h2>Created by <a href="#" onclick="openAuthor();">techministry.blog</a></h2><h3
</div>
</div>
</div>

</section>
<section>
<div class='horizontal-line'></div>
Expand Down Expand Up @@ -571,6 +582,12 @@ <h2>Created by <a href="#" onclick="openAuthor();">techministry.blog</a></h2><h3
<section>
<div class='horizontal-line' style="padding-bottom: 4px;"></div>
<div class='form-row'>
<div class='form-group col-md-4'>
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="switchHttp" onClick="plugin_enable('http');">
<label class="custom-control-label" for="switchHttp"><b>HTTP Requests</b></label>
</div>
</div>
<div class='form-group col-md-4'>
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="switchCompanion" onClick="plugin_enable('companion');">
Expand All @@ -588,15 +605,6 @@ <h2>Created by <a href="#" onclick="openAuthor();">techministry.blog</a></h2><h3
</div>
</section>
<section>
<div class='horizontal-line'></div>
<div class='form-row'>
<div class='form-group col-md-4'>
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="switchHttp" onClick="plugin_enable('http');">
<label class="custom-control-label" for="switchHttp"><b>HTTP Requests</b></label>
</div>
</div>
</div>
</section>
<section>
<div class='horizontal-line'></div>
Expand Down
32 changes: 19 additions & 13 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,17 +440,19 @@ function propresenter_connect() {
});

propresenter_socket.on('error', function (err) {
if (err.errno.indexOf('ECONNREFUSED') > -1) {
propresenter_status = 'econnrefused';
SendStatusMessage();
trayMenuItems[0].label = 'Connection Refused: ' + ip + ':' + port;
buildTray();
}
else if (err.errno.indexOf('ETIMEDOUT') > -1) {
propresenter_status = 'etimedout';
SendStatusMessage();
trayMenuItems[0].label = 'Connection Timed Out: ' + ip + ':' + port;
buildTray();
if (err.errno !== undefined){
if (err.errno.indexOf('ECONNREFUSED') > -1) {
propresenter_status = 'econnrefused';
SendStatusMessage();
trayMenuItems[0].label = 'Connection Refused: ' + ip + ':' + port;
buildTray();
}
else if (err.errno.indexOf('ETIMEDOUT') > -1) {
propresenter_status = 'etimedout';
SendStatusMessage();
trayMenuItems[0].label = 'Connection Timed Out: ' + ip + ':' + port;
buildTray();
}
}
});

Expand Down Expand Up @@ -645,10 +647,14 @@ function handleStageDisplayMessage(message) {
case 'fv':
for (let i = 0; i < objData.ary.length; i++) {
if (objData.ary[i].acn === 'cs') {
propresenter_cs = objData.ary[i].txt;
if(config.get('switch_PPUCase')) {
propresenter_cs = objData.ary[i].txt.toUpperCase();
} else {
propresenter_cs = objData.ary[i].txt;
}
if (lyrics_on) {
if (bridgeConnected) {
bridgeIO.emit('current_slide', config.get('presentationbridgeID'), objData.ary[i].txt);
bridgeIO.emit('current_slide', config.get('presentationbridgeID'), propresenter_cs);
if(config.get('switch_PPimages')) {
sendProPresenterImage(objData.ary[i].uid)
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "presentationbridge-client",
"productName": "PresentationBridge Client",
"version": "1.0.12",
"version": "1.0.13",
"description": "Links data from your Presentation / lyrics software to other software.",
"license": "MIT",
"repository": "josephdadams/presentationbridge-client",
Expand Down

0 comments on commit c91ddbf

Please sign in to comment.