vani-meeting-client 0.2.9 → 0.3.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.
@@ -70,14 +70,19 @@ var UserMediaHandler = /** @class */ (function (_super) {
70
70
  return _this;
71
71
  }
72
72
  UserMediaHandler.prototype.switchCamera = function () {
73
- var _a;
73
+ var _a, _b;
74
74
  return __awaiter(this, void 0, void 0, function () {
75
- return __generator(this, function (_b) {
75
+ var videoTrack;
76
+ return __generator(this, function (_c) {
76
77
  if (this.meetingStartRequest && this.meetingStartRequest.isMobileApp) {
78
+ videoTrack = (_a = this.communicationHandler) === null || _a === void 0 ? void 0 : _a.getAllSelfTracks().find(function (track) { return track.trackKind === TrackKind.Video; });
79
+ if (videoTrack && videoTrack.track) {
80
+ videoTrack.track.switchCamera();
81
+ }
77
82
  }
78
83
  else {
79
84
  if (!this.cameraFacingMode) {
80
- this.cameraFacingMode = (_a = this.meetingStartRequest) === null || _a === void 0 ? void 0 : _a.defaultCameraFacingMode;
85
+ this.cameraFacingMode = (_b = this.meetingStartRequest) === null || _b === void 0 ? void 0 : _b.defaultCameraFacingMode;
81
86
  }
82
87
  if (this.cameraFacingMode === CameraFacingMode.Front) {
83
88
  this.cameraFacingMode = CameraFacingMode.Back;
@@ -7,7 +7,6 @@ export declare class SFUHandler extends BaseVideoCallHandler {
7
7
  private routerRtpCapabilities?;
8
8
  private sendTransport?;
9
9
  private consumerTransport?;
10
- private dataChannelTranport?;
11
10
  private isProduceTrackIntialWorkDone;
12
11
  private producers;
13
12
  private consumers;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vani-meeting-client",
3
- "version": "0.2.9",
3
+ "version": "0.3.0",
4
4
  "description": "Vani Meeting Clinet SDK",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",