MCPcopy
hub / github.com/requirejs/requirejs / _playSound

Function _playSound

tests/doh/_browserRunner.js:508–520  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

506
507 var _nameTimes = {};
508 var _playSound = function(name){
509 if(byId("hiddenAudio") && byId("audio") && byId("audio").checked){
510 // console.debug("playing:", name);
511 var nt = _nameTimes[name];
512 // only play sounds once every second or so
513 if((!nt)||(((new Date)-nt) > 700)){
514 _nameTimes[name] = new Date();
515 var tc = document.createElement("span");
516 byId("hiddenAudio").appendChild(tc);
517 tc.innerHTML = '<embed src="_sounds/'+name+'.wav" autostart="true" loop="false" hidden="true" width="1" height="1"></embed>';
518 }
519 }
520 }
521
522 doh._updateGlobalProgressBar = function(p,success,group){
523 var outerContainer=byId("progressOuter");

Callers 1

_browserRunner.jsFile · 0.85

Calls 1

byIdFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…