Skip to content

Commit

Permalink
stop converting buffer to array server side
Browse files Browse the repository at this point in the history
  • Loading branch information
thelamer committed Feb 28, 2023
1 parent f050312 commit 0147d77
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
});
Expand Down

0 comments on commit 0147d77

Please sign in to comment.