Skip to content

Commit

Permalink
Use c.json instead of c.any due unknown browser issues
Browse files Browse the repository at this point in the history
  • Loading branch information
LuKks committed Feb 5, 2024
1 parent 1f73568 commit 4ad6c58
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 4ad6c58

Please sign in to comment.