@whereby.com/media 1.1.0 → 1.1.2

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.
package/dist/index.d.ts CHANGED
@@ -614,12 +614,15 @@ interface RoomJoinedEvent {
614
614
  } | null;
615
615
  };
616
616
  selfId: string;
617
+ clientClaim?: string;
617
618
  }
618
619
  interface RoomKnockedEvent {
619
620
  clientId: string;
620
621
  displayName: string | null;
621
622
  imageUrl: string | null;
622
623
  liveVideo: boolean;
624
+ selfId?: string;
625
+ clientClaim?: string;
623
626
  }
624
627
  interface RoomSessionEndedEvent {
625
628
  roomSessionId: string;
package/dist/index.esm.js CHANGED
@@ -5274,7 +5274,10 @@ class VegaRtcManager {
5274
5274
  logger$1.info("_internalSendWebcam()");
5275
5275
  this._webcamProducerPromise = (() => __awaiter(this, void 0, void 0, function* () {
5276
5276
  try {
5277
- if (!this._webcamTrack || !this._sendTransport || this._webcamProducer) {
5277
+ if (!this._webcamTrack ||
5278
+ this._webcamTrack.readyState !== "live" ||
5279
+ !this._sendTransport ||
5280
+ this._webcamProducer) {
5278
5281
  this._webcamProducerPromise = null;
5279
5282
  return;
5280
5283
  }
@@ -5319,6 +5322,10 @@ class VegaRtcManager {
5319
5322
  _replaceWebcamTrack() {
5320
5323
  return __awaiter(this, void 0, void 0, function* () {
5321
5324
  logger$1.info("_replaceWebcamTrack()");
5325
+ if (!this._webcamTrack)
5326
+ return;
5327
+ if (!this._webcamProducer && this._webcamTrack.enabled)
5328
+ yield this._internalSendWebcam();
5322
5329
  if (!this._webcamTrack || !this._webcamProducer || this._webcamProducer.closed)
5323
5330
  return;
5324
5331
  if (this._webcamProducer.track !== this._webcamTrack) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@whereby.com/media",
3
3
  "description": "Media library for Whereby",
4
- "version": "1.1.0",
4
+ "version": "1.1.2",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/whereby/sdk",
7
7
  "repository": {
@@ -13,9 +13,9 @@
13
13
  },
14
14
  "scripts": {
15
15
  "build": "rimraf dist && rollup -c rollup.config.js",
16
- "lint": "eslint src tests",
17
- "test": "npm run lint && npm run test:unit",
16
+ "test": "npm run test:lint && npm run test:unit",
18
17
  "test:unit": "jest",
18
+ "test:lint": "eslint src tests",
19
19
  "test:unit:coverage": "jest --collectCoverage",
20
20
  "format:fix": "prettier --write './**/*.{js,ts,yml,json}'",
21
21
  "format:check": "prettier --check './**/*.{js,ts,yml,json}'"
@@ -67,10 +67,6 @@
67
67
  "@types/uuid": "^9.0.8",
68
68
  "@types/uuid-validate": "^0.0.3",
69
69
  "babel-jest": "^29.7.0",
70
- "eslint": "^8.56.0",
71
- "eslint-config-prettier": "^9.0.0",
72
- "eslint-plugin-jest": "^27.6.0",
73
- "eslint-plugin-prettier": "^5.1.3",
74
70
  "jest-environment-jsdom": "^29.7.0",
75
71
  "process": "^0.11.10",
76
72
  "rollup": "^4.12.1",