vani-meeting-client 0.3.7 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -241,7 +241,7 @@ var SFUHandler = /** @class */ (function (_super) {
241
241
  };
242
242
  SFUHandler.prototype.sendMessageViaDataChannel = function (messagePayload) {
243
243
  if (this.dataProducers && this.dataProducers.length > 0) {
244
- this.dataProducers[0].send(messagePayload);
244
+ this.dataProducers[0].send(JSON.stringify(messagePayload));
245
245
  }
246
246
  };
247
247
  SFUHandler.prototype.init = function () {
@@ -481,6 +481,11 @@ var SFUHandler = /** @class */ (function (_super) {
481
481
  _this.dataConsumer.push(consumer);
482
482
  consumer.on("message", function (message, ppid) {
483
483
  var _a;
484
+ console.log(message);
485
+ if (ppid === 51)
486
+ console.log("text message received:", message.toString("utf-8"));
487
+ else if (ppid === 53)
488
+ console.log("binary message received");
484
489
  if (message && message.message) {
485
490
  (_a = _this.communicationHandler) === null || _a === void 0 ? void 0 : _a.onMessage(message.message);
486
491
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vani-meeting-client",
3
- "version": "0.3.7",
3
+ "version": "0.4.0",
4
4
  "description": "Vani Meeting Clinet SDK",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",