This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

sound on Win/PC and Android/Tablet
#18
You are missing a closing } for the CreateListeners function. It should be like this:
Code:
// Function to create event listeners
  function CreateListeners(groupaddr,url){
    // Make event listener to object
    if (typeof grp != 'undefined') {
      grp.listen(groupaddr, function(object, state) {
        var value = object.value;
        var enabled = grp.getvalue('32/2/1');
        if (state == 'value' && value == 1 && enabled) {
          Play_Audio(url);
        }
      }, true);
    }
  } // missing closing "}"
    
  // Start creating listeners
  for (var i in AudioTable) {
    CreateListeners(AudioTable[i].address,AudioTable[i].url);
  }

Next time if Custom JS is not working check browser console (F12) for any error messages.
Reply


Messages In This Thread
RE: sound on Win/PC and Android/Tablet - by admin - 23.12.2020, 06:54

Forum Jump: