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.

play beep on specific plan
#1
Hello colleagues, my idea is to be able to reproduce a beep (notification sound) on a specific plan, with a group address. when its state is 1, it reproduces the sound, the problem is what reproduces on all pages and must be in one



Adjunto el código javascript

Code:
$(function(){ 

  var context= new AudioContext();
 
function jsNota(frecuencia){
        var o= context.createOscillator();
        g=context.createGain();
        o.connect(g);
        o.type="sine";
        o.frequency.value=frecuencia;
        g.connect(context.destination);
        o.start(0);
        g.gain.exponentialRampToValueAtTime(0.00001,context.currentTime +1.5);
    }
grp.listen('1/1/1', function(object, state) {
    if (state == 'value' && object.value ) {
      jsNota(1174.659, function() {
      });
    }
  }, true);
 
  });

Gracias
Reply


Messages In This Thread
play beep on specific plan - by 3r1ck - 25.10.2019, 16:45
RE: play beep on specific plan - by 3r1ck - 25.10.2019, 19:43

Forum Jump: