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:
parent
77748475c5
commit
32aadb3a5e
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue