podchat-browser 12.9.10 → 12.9.11

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/changelog.md CHANGED
@@ -16,7 +16,7 @@ to see complete list of changelog please visit [ChangeLog](http://gp.fanapsoft.i
16
16
  - Ability to upload files with posibility to resume the process after network failure
17
17
  - Listed new reaction stickers
18
18
  - Added peer status events to MultiTrack
19
- - Added possibility to change media devices during the call process in MultiTrack
19
+ - Added possibility to change input devices during the call process in MultiTrack
20
20
 
21
21
  ### Fixed
22
22
  - Retry upload/download requests on error 403 from podspace
@@ -1 +1 @@
1
- {"version":"12.9.10","date":"۱۴۰۳/۲/۲۹","VersionInfo":"Release: true, Snapshot: false, Is For Test: false"}
1
+ {"version":"12.9.11","date":"۱۴۰۳/۲/۳۰","VersionInfo":"Release: true, Snapshot: false, Is For Test: false"}
@@ -315,12 +315,13 @@ function CallUser(app, user) {
315
315
  }
316
316
  return _context9.abrupt("return");
317
317
  case 2:
318
- _context9.next = 4;
318
+ if (config.isMe) app.call.currentCall().deviceManager().mediaStreams.stopVideoInput();
319
+ _context9.next = 5;
319
320
  return config.videoTopicManager.destroy();
320
- case 4:
321
+ case 5:
321
322
  delete config.htmlElements[config.user.videoTopicName];
322
323
  config.videoTopicManager = null;
323
- case 6:
324
+ case 7:
324
325
  case "end":
325
326
  return _context9.stop();
326
327
  }
@@ -260,17 +260,18 @@ function DeviceManager(app) {
260
260
  audiooutput: []
261
261
  };
262
262
  devices.forEach(function (device) {
263
- var _my_devices$kind;
264
- console.log('debug11', device);
265
- var kind = device.kind,
266
- label = device.label,
267
- deviceId = device.deviceId,
268
- groupId = device.groupId;
269
- (_my_devices$kind = my_devices[kind]) === null || _my_devices$kind === void 0 ? void 0 : _my_devices$kind.push({
270
- label: label,
271
- deviceId: deviceId,
272
- groupId: groupId
273
- });
263
+ if (device.deviceId !== "default") {
264
+ var _my_devices$kind;
265
+ var kind = device.kind,
266
+ label = device.label,
267
+ deviceId = device.deviceId,
268
+ groupId = device.groupId;
269
+ (_my_devices$kind = my_devices[kind]) === null || _my_devices$kind === void 0 ? void 0 : _my_devices$kind.push({
270
+ label: label,
271
+ deviceId: deviceId,
272
+ groupId: groupId
273
+ });
274
+ }
274
275
  });
275
276
  callback && callback({
276
277
  hasError: false,
@@ -45270,7 +45270,7 @@ FilterXSS.prototype.process = function (html) {
45270
45270
  module.exports = FilterXSS;
45271
45271
 
45272
45272
  },{"./default":277,"./parser":279,"./util":280,"cssfilter":128}],282:[function(require,module,exports){
45273
- module.exports={"version":"12.9.10","date":"۱۴۰۳/۲/۲۹","VersionInfo":"Release: true, Snapshot: false, Is For Test: false"}
45273
+ module.exports={"version":"12.9.11","date":"۱۴۰۳/۲/۳۰","VersionInfo":"Release: true, Snapshot: false, Is For Test: false"}
45274
45274
  },{}],283:[function(require,module,exports){
45275
45275
  "use strict";
45276
45276
 
@@ -52826,14 +52826,15 @@ function CallUser(app, user) {
52826
52826
  return _context9.abrupt("return");
52827
52827
 
52828
52828
  case 2:
52829
- _context9.next = 4;
52829
+ if (config.isMe) app.call.currentCall().deviceManager().mediaStreams.stopVideoInput();
52830
+ _context9.next = 5;
52830
52831
  return config.videoTopicManager.destroy();
52831
52832
 
52832
- case 4:
52833
+ case 5:
52833
52834
  delete config.htmlElements[config.user.videoTopicName];
52834
52835
  config.videoTopicManager = null;
52835
52836
 
52836
- case 6:
52837
+ case 7:
52837
52838
  case "end":
52838
52839
  return _context9.stop();
52839
52840
  }
@@ -53660,18 +53661,19 @@ function DeviceManager(app) {
53660
53661
  audiooutput: []
53661
53662
  };
53662
53663
  devices.forEach(function (device) {
53663
- var _my_devices$kind;
53664
-
53665
- console.log('debug11', device);
53666
- var kind = device.kind,
53667
- label = device.label,
53668
- deviceId = device.deviceId,
53669
- groupId = device.groupId;
53670
- (_my_devices$kind = my_devices[kind]) === null || _my_devices$kind === void 0 ? void 0 : _my_devices$kind.push({
53671
- label: label,
53672
- deviceId: deviceId,
53673
- groupId: groupId
53674
- });
53664
+ if (device.deviceId !== "default") {
53665
+ var _my_devices$kind;
53666
+
53667
+ var kind = device.kind,
53668
+ label = device.label,
53669
+ deviceId = device.deviceId,
53670
+ groupId = device.groupId;
53671
+ (_my_devices$kind = my_devices[kind]) === null || _my_devices$kind === void 0 ? void 0 : _my_devices$kind.push({
53672
+ label: label,
53673
+ deviceId: deviceId,
53674
+ groupId: groupId
53675
+ });
53676
+ }
53675
53677
  });
53676
53678
  callback && callback({
53677
53679
  hasError: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "podchat-browser",
3
- "version": "12.9.10",
3
+ "version": "12.9.11",
4
4
  "description": "Javascript SDK to use POD's Chat Service - Browser Only",
5
5
  "main": "./dist/node/chat.js",
6
6
  "scripts": {
@@ -8,7 +8,7 @@
8
8
  "publish:snapshot": "npm run version:snapshot && npm run build && npm run commitVersionChanges && npm publish --tag snapshot",
9
9
  "version:snapshot": "npm version prerelease --preid snapshot",
10
10
  "publish:release": "npm run version:release && npm run build && npm run commitVersionChanges && npm publish",
11
- "version:release": "npm version 12.9.10",
11
+ "version:release": "npm version 12.9.11",
12
12
  "build:browser": "browserify -t [ babelify ] src/chat.js > dist/podchat-browser-bundle.js",
13
13
  "build:npm": "babel src -d dist/node --copy-files",
14
14
  "commitVersionChanges": "git add . && git commit -m \"Version\" && npm run wait",
@@ -1 +1 @@
1
- {"version":"12.9.10","date":"۱۴۰۳/۲/۲۹","VersionInfo":"Release: true, Snapshot: false, Is For Test: false"}
1
+ {"version":"12.9.11","date":"۱۴۰۳/۲/۳۰","VersionInfo":"Release: true, Snapshot: false, Is For Test: false"}
@@ -173,6 +173,9 @@ function CallUser(app, user) {
173
173
  if (!config.videoTopicManager)
174
174
  return;
175
175
 
176
+ if(config.isMe)
177
+ app.call.currentCall().deviceManager().mediaStreams.stopVideoInput();
178
+
176
179
  await config.videoTopicManager.destroy();
177
180
  delete config.htmlElements[config.user.videoTopicName];
178
181
  config.videoTopicManager = null;
@@ -154,7 +154,7 @@ function DeviceManager(app) {
154
154
 
155
155
 
156
156
  },
157
- async changeJanusMediaDevice(params) {
157
+ async changeJanusMediaDevice(params) {
158
158
  let user = app.call.currentCall().users().get(app.store.user.get().id);
159
159
  let config = {deviceId: {exact: params.deviceId}};
160
160
  if (params.deviceType === 'audioIn') {
@@ -181,9 +181,10 @@ function DeviceManager(app) {
181
181
  console.log('debug22', devices)
182
182
  let my_devices = {audioinput: [], videoinput: [], audiooutput: []};
183
183
  devices.forEach((device) => {
184
- console.log('debug11', device)
185
- const {kind, label, deviceId, groupId} = device;
186
- my_devices[kind]?.push({label, deviceId, groupId});
184
+ if (device.deviceId !== "default") {
185
+ const {kind, label, deviceId, groupId} = device;
186
+ my_devices[kind]?.push({label, deviceId, groupId});
187
+ }
187
188
  });
188
189
  callback && callback({hasError: false, devices: my_devices})
189
190
  resolve(my_devices);