Closed DairexLord1 closed 5 months ago
u can use socketio for signaling then stream via webrtc, i think this is the best way to do https://docs.unity3d.com/Packages/com.unity.webrtc@2.4/manual/audiostreaming.html
for a file, and only socketio the way i'm thinking is to split the file into chunks and send to the server, you can search on how to do that
while ((bytesRead = fileStream.Read(chunkBuffer, 0, chunkSize)) > 0)
{
// send to the server
ProcessChunk(chunkBuffer, bytesRead);
}
// Close the file stream when done
fileStream.Close();
How to send audio file from unity to server via socket packed in json file?