janus-simple-videoroom-client 2.1.0 → 2.2.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.
Files changed (2) hide show
  1. package/dist/index.js +9 -9
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -9,7 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.createVideoRoomClient = exports.Janus = void 0;
12
+ exports.Janus = void 0;
13
+ exports.createVideoRoomClient = createVideoRoomClient;
13
14
  /**
14
15
  * Remove this once janus.js properly imports webrtc-adapter.
15
16
  * Currently janus npm package depends on webrtc-adapter but does not import it, and so it gets dropped during tree shaking.
@@ -28,7 +29,6 @@ function createVideoRoomClient(options) {
28
29
  };
29
30
  });
30
31
  }
31
- exports.createVideoRoomClient = createVideoRoomClient;
32
32
  function createVideoRoomSession(server, options) {
33
33
  return __awaiter(this, void 0, void 0, function* () {
34
34
  const eventTarget = makeEventTarget();
@@ -344,8 +344,8 @@ function createVideoRoomPublisher(handle, publisherId, opts) {
344
344
  });
345
345
  });
346
346
  },
347
- restart(mediaOptions = options.mediaOptions, publishOptions) {
348
- return __awaiter(this, void 0, void 0, function* () {
347
+ restart() {
348
+ return __awaiter(this, arguments, void 0, function* (mediaOptions = options.mediaOptions, publishOptions) {
349
349
  const offerJsep = yield new Promise(function (fulfill, reject) {
350
350
  handle.createOffer(Object.assign(Object.assign({}, mediaOptions), { success: fulfill, error: reject }));
351
351
  });
@@ -476,8 +476,8 @@ function createVideoRoomSubscriber(session, roomId, streams, opts) {
476
476
  });
477
477
  });
478
478
  },
479
- restart(mediaOptions = options.mediaOptions) {
480
- return __awaiter(this, void 0, void 0, function* () {
479
+ restart() {
480
+ return __awaiter(this, arguments, void 0, function* (mediaOptions = options.mediaOptions) {
481
481
  const response = yield handle.sendAsyncRequest({
482
482
  message: {
483
483
  request: "configure",
@@ -588,8 +588,8 @@ function createStreamingSubscriber(session, mountPointId, options) {
588
588
  mountPointId = newMountPointId;
589
589
  });
590
590
  },
591
- restart(newOptions = options) {
592
- return __awaiter(this, void 0, void 0, function* () {
591
+ restart() {
592
+ return __awaiter(this, arguments, void 0, function* (newOptions = options) {
593
593
  const response = yield handle.sendAsyncRequest({
594
594
  message: Object.assign(Object.assign({}, newOptions === null || newOptions === void 0 ? void 0 : newOptions.watchOptions), { request: "watch", id: mountPointId }),
595
595
  expectResponse: r => { var _a; return r.message.streaming == "event" && ((_a = r.message.result) === null || _a === void 0 ? void 0 : _a.status) == "preparing"; }
@@ -630,7 +630,7 @@ function handleOffer(handle, offerJsep, mediaOptions) {
630
630
  expectResponse: r => {
631
631
  var _a;
632
632
  return r.message.videoroom == "event" && r.message.started == "ok" ||
633
- r.message.streaming == "event" && ((_a = r.message.result) === null || _a === void 0 ? void 0 : _a.status) == "starting";
633
+ r.message.streaming == "event" && ((_a = r.message.result) === null || _a === void 0 ? void 0 : _a.status) == "started";
634
634
  }
635
635
  });
636
636
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "janus-simple-videoroom-client",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "Provides a simple high-level API that makes it easy to work with the Janus VideoRoom plugin",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -22,12 +22,12 @@
22
22
  },
23
23
  "homepage": "https://github.com/ken107/janus-videoroom-js#readme",
24
24
  "devDependencies": {
25
- "ts-loader": "^9.5.1",
26
- "typescript": "^4.9.4",
27
- "webpack": "^5.90.1",
28
- "webpack-cli": "^5.1.4"
25
+ "ts-loader": "^9.5.4",
26
+ "typescript": "^5.9.3",
27
+ "webpack": "^5.104.1",
28
+ "webpack-cli": "^6.0.1"
29
29
  },
30
30
  "dependencies": {
31
- "janus-gateway": "^1.2.1"
31
+ "janus-gateway": "^1.3.3"
32
32
  }
33
33
  }