{imgicourl}{zamok}
<< >>
05 2020
,

! , -, ! .

, :

https://lleo.me/test/gaga.htm

- , http , https . - , . Firefox, Opera, Chrome , .

[ gaga.htm]
<html><bodyonload='mp3_preload()'><!--(c)http://lleo.me-->
<center>
<h1>ɠ</h1>
<p><tableborder=0width=400>
<tr><td>audio</td><tdwidth=90%><imgid='summ'src="https://lleo.me/dnevnik/design/img/golo.gif"style="height:10px!important;width:0px"></td></tr>
<tr><td>silence</td><td><imgid='SIL'src="https://lleo.me/dnevnik/design/img/golo.gif"style="height:10px!important;width:0px"></td></tr>
<tr><td>noise</td><td><imgid='GOL'src="https://lleo.me/dnevnik/design/img/golo.gif"style="height:10px!important;width:0px"></td></tr>
</table>
<p><inputtype='button'value=''onclick='laught_go()'style='width:10%;height:10%;border-radius:100%'>
</center>

<script>
varNOISE_LIM=5;//(-)
varSIL_N=30;//,
varGOL_N=60;//,

varSIL=0,GOL=0,laught_arr=[1,2,3,4,5,6,7,8,9,10,11,12,13,14],laught_k=laught_arr.length;

functionmp3_preload(){for(variinlaught_arr)playsi(laught_arr[i],1);}

functionshuffle(a){for(vari=a.length-1;i>0;i--){varj=Math.floor(Math.random()*(i+1)),temp=a[i];a[i]=a[j];a[j]=temp;}}

functionlaught_go(){if(laught_k>=laught_arr.length){shuffle(laught_arr);laught_k=0;}playsi(laught_arr[laught_k++]);}

functionidd(id){return(typeof(id)=='object'?id:(document.getElementById(id)||false))}

functionplaysi(urli,silent){varid='playsi_'+urli,url='https://lleo.me/design/timem/people-laughing-'+urli+'.mp3';
vars="<audiostyle='position:absolute;width:1px;height:1px;overflow:hidden;left:-40px;top:0;opacity:0'"+(silent?'':"autoplay='autoplay'")+"src=\""+url+"\"></audio>";
if(idd(id))returnidd(id).innerHTML=s;
vardiv=document.createElement('DIV');div.id=id;div.innerHTML=s;document.body.appendChild(div);
}

navigator.getUserMedia=(navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia);

navigator.getUserMedia(
{audio:true,video:false},
function(stream){
varAudioContext=window.AudioContext||window.webkitAudioContext,
ctx=newAudioContext(),
source=ctx.createMediaStreamSource(stream),
analyser=ctx.createAnalyser(),
processor=ctx.createScriptProcessor(1024,1,1),
data;

source.connect(analyser);
source.connect(processor);
//analyser.connect(ctx.destination);
processor.connect(ctx.destination);

data=newUint8Array(analyser.frequencyBinCount);
processor.onaudioprocess=function(){
analyser.getByteFrequencyData(data);
varsumm=0;for(variindata)summ+=data[i];summ=Math.floor(summ/data.length);

GOL=Math.min(GOL,300);
SIL=Math.min(SIL,300);
idd('summ').style.width=summ+'px';
idd('SIL').style.width=SIL+'px';
idd('GOL').style.width=GOL+'px';

if(SIL>SIL_N&&SIL>GOL*3)GOL=0;

if(summ>NOISE_LIM){SIL=0;GOL++;}
else{SIL++;
if(SIL>SIL_N&&GOL>GOL_N){SIL=0;GOL=0;
laught_go();
setTimeout("SIL=GOL=0;",1000);
setTimeout("SIL=GOL=0;",2000);
setTimeout("SIL=GOL=0;",3000);
setTimeout("SIL=GOL=0;",4000);
}
}
}
},function(error){}
);
</script>
</body></html>


, , :

, 6 21:00 22:00 Zoom.

: https://leikozunet.timepad.ru/event/1305328/

: 200, 500 , . , .

, , "".

, "" . , , !


PS: - , ! . / . . , . . , . , , .htm , , , . , .

<< >>

/home/www/lleo.me/dnevnik/tmp/everybook/2021-10-26.htm