Possibility to blank custom stage view

Like many others I'm starting to use a custom stage view as an OBS feed for displaying bible/lyrics to video streams. The downside I've found however is that stage views do not blank in the way the main view does and therefore creates additional work in that someone needs to baby sit the OBS feed and duplicate the show/blank commands that the person controlling OpenLP is already doing.

Probably what would be really ideal is the ability to use custom views for the main view also, eg. like this http://xxx.xxx.x.xx:4316/main/Bible-CL instead of http://xxx.xxx.x.xx:4316/stage/Bible-CL



  • Hi, blanking sceeen can be done via javascript. There is a thread with sample code somewhere around.

  • If you want to blank the display completely whenever the main view is emptied, you need to change the function “pollServer” inside of the file “stage.js”

    pollServer: function () {
        function (data, status) {
          if (OpenLP.currentItem != data.results.item ||
            OpenLP.currentService != data.results.service) {
            OpenLP.currentItem = data.results.item;
            OpenLP.currentService = data.results.service;
          else if (OpenLP.currentSlide != data.results.slide) {
            OpenLP.currentSlide = parseInt(data.results.slide, 10);
          if(data.results.display || data.results.blank || data.results.theme) {
          else {
          // NEW CODE ENDS HERE

    In the OpenLP API there are three options for the three types of blanking the screen (display, blank, theme). If any of these are active, it hides the complete page. Otherwise it is displayed.

  • Does this apply only to the new version of openLP or will this work on version 2.4 as well?

    I have added the code to “stage.js” file but it doesn't seem to do anything.

  • edited April 23

    Hello! I would like this as well, the posted solution above seems to be for the old API (v1?), and i cant get it to work using the new 2.9.4 version with API.v2.

    I have searched all of the wiki's for API's and such and cant find the same solution modified for api v2.

    (Dont know the programming language well enough to understand the replacement for the "pollServer-function")

    I guess it could be somewhere in this function?

    updateSlide: function() {
      // Show the current slide on top. Any trailing slides for the same verse
      // are shown too underneath in grey.
      // Then leave a blank line between following verses
      $("#verseorder span").removeClass("currenttag");
      $("#tag" + OpenLP.currentTags[OpenLP.currentSlide]).addClass("currenttag");
      var slide = OpenLP.currentSlides[OpenLP.currentSlide];
      var text = "";
      // use title if available
      if (slide["text"]) {
        text = slide["text"];
      } else {
        text = slide["Title"];
      // use thumbnail if available
      if (slide["img"]) {
        text += "<br /><img src='" + slide["img"].replace("//thumbnails//", "//thumbnails//") + "'><br />";
      // use notes if available
      if (slide["slide_notes"]) {
        text += '<br />' + slide["footer"];
      // "slide_notes"
      text = text.replace(/\n/g, "<br />");
      text = "";
      if (OpenLP.currentSlide < OpenLP.currentSlides.length - 1) {
       for (var idx = OpenLP.currentSlide + 1; idx < OpenLP.currentSlides.length; idx++) {
        if (OpenLP.currentTags[idx] != OpenLP.currentTags[idx - 1])
          text = text + "<p class=\"nextslide\">";
        if (OpenLP.currentSlides[idx]["text"]) {
          text = text + OpenLP.currentSlides[idx]["text"];
        } else {
          text = text + OpenLP.currentSlides[idx]["title"];
        if (OpenLP.currentTags[idx] != OpenLP.currentTags[idx - 1])
          text = text + "</p>";
          text = text + "<br />";
Sign In or Register to comment.