1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

convert data blob into ArrayBuffer

This commit is contained in:
Iris Marie Köster 2022-04-07 13:16:18 +02:00
parent 77748475c5
commit 32aadb3a5e

View file

@ -431,11 +431,11 @@
// Handle onmessage events for the receiving channel.
// These are the data messages sent by the sending channel.
function handleDataChannelMessage(event) {
async function handleDataChannelMessage(event) {
var dec = new TextDecoder();
var raw = event.data;
var msg = dec.decode(raw);
var msg = dec.decode(await raw.arrayBuffer());
var msgJson = JSON.parse(msg);
console.info('Received message', msgJson);