aa
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"net"
|
||||
"strings"
|
||||
"time"
|
||||
"unicode/utf8"
|
||||
)
|
||||
|
||||
//入口
|
||||
@@ -245,6 +246,13 @@ func (t *TcpClient) doPrint(key string) (err error) {
|
||||
dataStr := <-t.CallBackMap[printMsg.PrintNo]
|
||||
a, b := getCallbackMsgInfo(dataStr)
|
||||
t.changePrintMsg(dataStr, a, b)
|
||||
//判断音频暂停?
|
||||
//收到打印成功回调后,如果消息中有音频,需要等待一下
|
||||
if sounds := regexpSoundSpan.FindStringSubmatch(printMsg.Content); len(sounds) > 0 {
|
||||
sound := sounds[1]
|
||||
lenTime := time.Duration(utf8.RuneCountInString(sound)) * time.Second
|
||||
time.Sleep(lenTime)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user