stop converting buffer to array server side

This commit is contained in:
thelamer 2023-02-28 10:00:06 -08:00
parent f050312d7a
commit 0147d77802

View File

@ -147,8 +147,7 @@ aio.on('connection', function (socket) {
record.on('connection', function(){
record.on('data', function(chunk) {
// Only send real audio data
let arr = chunk.toJSON().data;
if (arr.length < 26456) {
if (chunk.length < 26456) {
aio.sockets.to(id).emit('audio', chunk);
}
});