Send Bible Reference to Remote

Hello


In my church we are doing streams and we wanted to send the verses of the bible as subtitles to the pc that stream.

I saw that with OpenLP I can send a custom stage, that by modifying the html I can give it a green background and then with a chroma filter remove the background.

But the only problem I have had it is: it doesn't send the bible reference, and the version (if it is possible).


My question is if there is any option to send that information in the custom stage.

Comments

  • The only thing you could do is send the title of the service item to the stage view. The title of a bible verse is usually something like this

    Lukas 1:1-10 BasisBibel, Deutsche Bibelgesellschaft
    

    but you can change that in the service list. You could actually filter automatically to only show the bible reference. How much do you know about JavaScript or programming in general?

  • I am python developer and I know few of Javascript.

  • When the stage view server is running, you can access all the service items via the URL

    http://localhost:4316/api/service/list
    

    In your stage view folder, there is the JavaScript file stage.js. Right at the top you’ll find the lines

    $.getJSON(
      "/api/service/list",
    

    where the script reads out the list of service items. It loops through all the items and looks for the currently active item here:

    if (data.results.items[idx]["selected"]) {
    

    Right after that you have to insert new code. By default, the script writes the notes into a html element with the id notes:

    $("#notes").html(data.results.items[idx]["notes"].replace(/\n/g, "<br />"));
    

    What we want to do is also to write the title into a html element with the id title. So something like this should do it:

    $("#title").html(data.results.items[idx]["title"]);
    

    Maybe you want to do this only for bible verses. Then it should look like this:

    if (data.results.items[idx]["plugin"] == "bibles") {
      $("#title").html(data.results.items[idx]["title"]);
    }
    else {
      $("#title").empty();
    }
    

    Then, in the file stage.html, insert an element with the id title, and style it to your liking.

    <div id="title" style="..."></div>
    

    And, don’t forget to point the html file to the altered .js file.

    From: <script type="text/javascript" src="/files/stage.js"></script>
    To:   <script type="text/javascript" src="/stage/yourStageName/stage.js"></script>
    
Sign In or Register to comment.