vani-meeting-client 0.2.8 → 0.3.1
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/lib/MeetingHandler.js
CHANGED
|
@@ -40,8 +40,8 @@ import * as log from 'loglevel';
|
|
|
40
40
|
import { WebSocketBasicEvents, WebsocketHandler } from "./websocket-handler/WebsocketHandler";
|
|
41
41
|
import { CommunicationHandler } from "./inter-communication-handler/CommunicationHandler";
|
|
42
42
|
import { UserMediaHandler } from "./user-media-handler/UserMediaHandler";
|
|
43
|
-
import Analytics from 'analytics'
|
|
44
|
-
import googleAnalytics from '@analytics/google-analytics'
|
|
43
|
+
// import Analytics from 'analytics'
|
|
44
|
+
// import googleAnalytics from '@analytics/google-analytics'
|
|
45
45
|
var MeetingHandler = /** @class */ (function () {
|
|
46
46
|
function MeetingHandler() {
|
|
47
47
|
this.communicationHandler = new CommunicationHandler(this);
|
|
@@ -411,25 +411,7 @@ var MeetingHandler = /** @class */ (function () {
|
|
|
411
411
|
};
|
|
412
412
|
MeetingHandler.prototype.handleGA = function () {
|
|
413
413
|
return __awaiter(this, void 0, void 0, function () {
|
|
414
|
-
var analytics;
|
|
415
414
|
return __generator(this, function (_a) {
|
|
416
|
-
if (this.meetingStartRequest) {
|
|
417
|
-
analytics = Analytics({
|
|
418
|
-
app: this.meetingStartRequest.appId,
|
|
419
|
-
plugins: [
|
|
420
|
-
googleAnalytics({
|
|
421
|
-
trackingId: 'UA-190458994-3'
|
|
422
|
-
})
|
|
423
|
-
]
|
|
424
|
-
});
|
|
425
|
-
analytics.page();
|
|
426
|
-
analytics.track('event', {
|
|
427
|
-
category: 'AppId',
|
|
428
|
-
label: this.meetingStartRequest.appId,
|
|
429
|
-
action: this.meetingStartRequest.roomId,
|
|
430
|
-
value: 0
|
|
431
|
-
});
|
|
432
|
-
}
|
|
433
415
|
return [2 /*return*/];
|
|
434
416
|
});
|
|
435
417
|
});
|
|
@@ -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
|
-
|
|
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 = (
|
|
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;
|