From 4ad6c582a330e5cd85a14d059fdddfe7f869b078 Mon Sep 17 00:00:00 2001 From: Lucas Barrena Date: Mon, 5 Feb 2024 01:00:15 -0300 Subject: [PATCH] Use c.json instead of c.any due unknown browser issues --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index ae316a1..131eccf 100644 --- a/index.js +++ b/index.js @@ -19,9 +19,9 @@ module.exports = class WebPeer { if (this._channel === null) throw new Error('Channel duplicated') - this._ice = this._channel.addMessage({ encoding: c.any, onmessage: this._onice.bind(this) }) - this._offer = this._channel.addMessage({ encoding: c.any, onmessage: this._onoffer.bind(this) }) - this._answer = this._channel.addMessage({ encoding: c.any, onmessage: this._onanswer.bind(this) }) + this._ice = this._channel.addMessage({ encoding: c.json, onmessage: this._onice.bind(this) }) + this._offer = this._channel.addMessage({ encoding: c.json, onmessage: this._onoffer.bind(this) }) + this._answer = this._channel.addMessage({ encoding: c.json, onmessage: this._onanswer.bind(this) }) this._channel.open()