@whereby.com/media 1.3.7 → 1.3.9

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.cjs CHANGED
@@ -5341,14 +5341,12 @@ class VegaRtcManager {
5341
5341
  _internalSendWebcam() {
5342
5342
  return __awaiter(this, void 0, void 0, function* () {
5343
5343
  logger$1.info("_internalSendWebcam()");
5344
- if (!this._webcamTrack ||
5345
- this._webcamTrack.readyState === "ended" ||
5346
- !this._sendTransport ||
5347
- this._webcamProducer) {
5348
- return;
5349
- }
5350
5344
  this._webcamProducerPromise = (() => __awaiter(this, void 0, void 0, function* () {
5351
5345
  try {
5346
+ if (!this._webcamTrack || !this._sendTransport || this._webcamProducer) {
5347
+ this._webcamProducerPromise = null;
5348
+ return;
5349
+ }
5352
5350
  const currentPaused = this._webcamPaused;
5353
5351
  const producer = yield this._sendTransport.produce(Object.assign(Object.assign({ track: this._webcamTrack, disableTrackOnPause: false, stopTracks: false }, getMediaSettings("video", false, this._features)), { appData: {
5354
5352
  streamId: OUTBOUND_CAM_OUTBOUND_STREAM_ID,
@@ -5390,10 +5388,6 @@ class VegaRtcManager {
5390
5388
  _replaceWebcamTrack() {
5391
5389
  return __awaiter(this, void 0, void 0, function* () {
5392
5390
  logger$1.info("_replaceWebcamTrack()");
5393
- if (!this._webcamTrack)
5394
- return;
5395
- if (this._sendTransport && !this._webcamProducer && this._webcamTrack.enabled)
5396
- yield this._internalSendWebcam();
5397
5391
  if (!this._webcamTrack || !this._webcamProducer || this._webcamProducer.closed)
5398
5392
  return;
5399
5393
  if (this._webcamProducer.track !== this._webcamTrack) {
package/dist/index.d.cts CHANGED
@@ -693,6 +693,7 @@ interface JoinRoomRequest {
693
693
  organizationId: string;
694
694
  roomName: string;
695
695
  displayName?: string;
696
+ clientClaim?: string;
696
697
  }
697
698
  interface KnockRoomRequest {
698
699
  displayName: string;
package/dist/index.d.mts CHANGED
@@ -693,6 +693,7 @@ interface JoinRoomRequest {
693
693
  organizationId: string;
694
694
  roomName: string;
695
695
  displayName?: string;
696
+ clientClaim?: string;
696
697
  }
697
698
  interface KnockRoomRequest {
698
699
  displayName: string;
package/dist/index.d.ts CHANGED
@@ -693,6 +693,7 @@ interface JoinRoomRequest {
693
693
  organizationId: string;
694
694
  roomName: string;
695
695
  displayName?: string;
696
+ clientClaim?: string;
696
697
  }
697
698
  interface KnockRoomRequest {
698
699
  displayName: string;
package/dist/index.mjs CHANGED
@@ -5320,14 +5320,12 @@ class VegaRtcManager {
5320
5320
  _internalSendWebcam() {
5321
5321
  return __awaiter(this, void 0, void 0, function* () {
5322
5322
  logger$1.info("_internalSendWebcam()");
5323
- if (!this._webcamTrack ||
5324
- this._webcamTrack.readyState === "ended" ||
5325
- !this._sendTransport ||
5326
- this._webcamProducer) {
5327
- return;
5328
- }
5329
5323
  this._webcamProducerPromise = (() => __awaiter(this, void 0, void 0, function* () {
5330
5324
  try {
5325
+ if (!this._webcamTrack || !this._sendTransport || this._webcamProducer) {
5326
+ this._webcamProducerPromise = null;
5327
+ return;
5328
+ }
5331
5329
  const currentPaused = this._webcamPaused;
5332
5330
  const producer = yield this._sendTransport.produce(Object.assign(Object.assign({ track: this._webcamTrack, disableTrackOnPause: false, stopTracks: false }, getMediaSettings("video", false, this._features)), { appData: {
5333
5331
  streamId: OUTBOUND_CAM_OUTBOUND_STREAM_ID,
@@ -5369,10 +5367,6 @@ class VegaRtcManager {
5369
5367
  _replaceWebcamTrack() {
5370
5368
  return __awaiter(this, void 0, void 0, function* () {
5371
5369
  logger$1.info("_replaceWebcamTrack()");
5372
- if (!this._webcamTrack)
5373
- return;
5374
- if (this._sendTransport && !this._webcamProducer && this._webcamTrack.enabled)
5375
- yield this._internalSendWebcam();
5376
5370
  if (!this._webcamTrack || !this._webcamProducer || this._webcamProducer.closed)
5377
5371
  return;
5378
5372
  if (this._webcamProducer.track !== this._webcamTrack) {
@@ -5320,14 +5320,12 @@ class VegaRtcManager {
5320
5320
  _internalSendWebcam() {
5321
5321
  return __awaiter(this, void 0, void 0, function* () {
5322
5322
  logger$1.info("_internalSendWebcam()");
5323
- if (!this._webcamTrack ||
5324
- this._webcamTrack.readyState === "ended" ||
5325
- !this._sendTransport ||
5326
- this._webcamProducer) {
5327
- return;
5328
- }
5329
5323
  this._webcamProducerPromise = (() => __awaiter(this, void 0, void 0, function* () {
5330
5324
  try {
5325
+ if (!this._webcamTrack || !this._sendTransport || this._webcamProducer) {
5326
+ this._webcamProducerPromise = null;
5327
+ return;
5328
+ }
5331
5329
  const currentPaused = this._webcamPaused;
5332
5330
  const producer = yield this._sendTransport.produce(Object.assign(Object.assign({ track: this._webcamTrack, disableTrackOnPause: false, stopTracks: false }, getMediaSettings("video", false, this._features)), { appData: {
5333
5331
  streamId: OUTBOUND_CAM_OUTBOUND_STREAM_ID,
@@ -5369,10 +5367,6 @@ class VegaRtcManager {
5369
5367
  _replaceWebcamTrack() {
5370
5368
  return __awaiter(this, void 0, void 0, function* () {
5371
5369
  logger$1.info("_replaceWebcamTrack()");
5372
- if (!this._webcamTrack)
5373
- return;
5374
- if (this._sendTransport && !this._webcamProducer && this._webcamTrack.enabled)
5375
- yield this._internalSendWebcam();
5376
5370
  if (!this._webcamTrack || !this._webcamProducer || this._webcamProducer.closed)
5377
5371
  return;
5378
5372
  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.3.7",
4
+ "version": "1.3.9",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/whereby/sdk",
7
7
  "repository": {