2022-03-20 12:25:29 +08:00
|
|
|
import QtWebSockets 1.1
|
|
|
|
|
|
|
|
|
|
import "."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WebSocket {
|
2022-05-12 20:12:56 +08:00
|
|
|
url: "ws://" + Common.wsIp + ":" + Common.wsPort
|
2022-03-20 12:25:29 +08:00
|
|
|
active: true
|
|
|
|
|
|
|
|
|
|
onStatusChanged: {
|
|
|
|
|
if(status === WebSocket.Closed || status === WebSocket.Error) {
|
2022-05-12 20:12:56 +08:00
|
|
|
Common.rebootFlag = true;
|
2022-03-20 12:25:29 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onBinaryMessageReceived: {
|
|
|
|
|
let arrayBuffer = new Float32Array(message);
|
|
|
|
|
Common.audioDataUpdated(arrayBuffer.slice());
|
|
|
|
|
}
|
|
|
|
|
}
|