MCPcopy Create free account
hub / github.com/modelscope/FunASR / getConnState

Function getConnState

runtime/html5/static/main.js:386–415  ·  view source on GitHub ↗
( connState )

Source from the content-addressed store, hash-verified

384
385// 连接状态响应
386function getConnState( connState ) {
387 if ( connState === 0 ) { //on open
388
389
390 info_div.innerHTML='连接成功!请点击开始';
391 if (isfilemode==true){
392 info_div.innerHTML='请耐心等待,大文件等待时间更长';
393 start_file_send();
394 }
395 else
396 {
397 btnStart.disabled = false;
398 btnStop.disabled = true;
399 btnConnect.disabled=true;
400 }
401 } else if ( connState === 1 ) {
402 //stop();
403 } else if ( connState === 2 ) {
404 stop();
405 console.log( 'connecttion error' );
406
407 alert("连接地址"+document.getElementById('wssip').value+"失败,请检查asr地址和端口。或试试界面上手动授权,再连接。");
408 btnStart.disabled = true;
409 btnStop.disabled = true;
410 btnConnect.disabled=false;
411
412
413 info_div.innerHTML='请点击连接';
414 }
415}
416
417function record()
418{

Callers

nothing calls this directly

Calls 3

start_file_sendFunction · 0.70
stopFunction · 0.70
logMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…