MCPcopy
hub / github.com/xiangyuecn/Recorder / rtcVoiceView

Function rtcVoiceView

assets/zdemo.index.webrtc.js:514–518  ·  view source on GitHub ↗
(data,isIn)

Source from the content-addressed store, hash-verified

512 $(".webrtcMsgBox").prepend('<div class="'+(isIn?"webrtcMsgIn":"webrtcMsgOut")+'">'+rtcMsgTime()+msg.replace(/[<>&]/g,function(a){return "&#"+a.charCodeAt(0)+";"}).replace(/ /g,"&nbsp;").replace(/[\r\n]/g,"<br>")+'</div>');
513};
514var rtcVoiceView=function(data,isIn){
515 var id=RandomKey(16);
516 rtcVoiceDatas[id]=data;
517 $(".webrtcMsgBox").prepend('<div class="'+(isIn?"webrtcMsgIn":"webrtcMsgOut")+'" onclick="rtcVoicePlay(\''+id+'\')" style="cursor: pointer;">'+rtcMsgTime()+'<span style="color:#06c">语音</span> '+(data.duration/1000).toFixed(2)+'s</div>');
518};
519var rtcVoiceDatas={};
520var rtcVoicePlay=function(id){
521 var audio=$(".recPlay")[0];

Callers 2

webrtcVoiceSendFunction · 0.85
webrtcReceiveFunction · 0.85

Calls 2

rtcMsgTimeFunction · 0.85
$Function · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…