@techsee/techsee-media-service-client 999.1.3-jaber-PinIssue → 999.1.3-sss
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/components/Multiparty.d.ts +5 -23
- package/lib/components/Multiparty.js +12 -192
- package/lib/components/Multiparty.js.map +1 -1
- package/lib/index.d.ts +1 -6
- package/lib/index.js +2 -25
- package/lib/index.js.map +1 -1
- package/lib/services/LayoutManager.d.ts +0 -0
- package/lib/services/LayoutManager.js +3 -0
- package/lib/services/LayoutManager.js.map +1 -0
- package/lib/services/WebRTCClient.d.ts +22 -0
- package/lib/services/WebRTCClient.js +123 -0
- package/lib/services/WebRTCClient.js.map +1 -0
- package/lib/stories/Multiparty.stories.d.ts +4 -0
- package/lib/stories/Multiparty.stories.js +25 -0
- package/lib/stories/Multiparty.stories.js.map +1 -0
- package/package.json +54 -87
- package/lib/assets/img/avatar.png +0 -0
- package/lib/assets/img/camera-button.png +0 -0
- package/lib/assets/img/exclamation-mark.png +0 -0
- package/lib/assets/img/media-rejected/chrome1.png +0 -0
- package/lib/assets/img/media-rejected/chrome2.png +0 -0
- package/lib/assets/img/media-rejected/chrome3.png +0 -0
- package/lib/assets/img/media-rejected/chrome4.png +0 -0
- package/lib/assets/img/media-rejected/close_button.png +0 -0
- package/lib/assets/img/media-rejected/ios1.png +0 -0
- package/lib/assets/img/media-rejected/ios2.png +0 -0
- package/lib/components/Avatar/Avatar.d.ts +0 -8
- package/lib/components/Avatar/Avatar.d.ts.map +0 -1
- package/lib/components/Avatar/Avatar.js +0 -26
- package/lib/components/Avatar/Avatar.js.map +0 -1
- package/lib/components/Avatar/Avatar.scss +0 -45
- package/lib/components/ButtonPanels/EndMeetingButtonPanel/EndMeetingButtonPanel.d.ts +0 -7
- package/lib/components/ButtonPanels/EndMeetingButtonPanel/EndMeetingButtonPanel.d.ts.map +0 -1
- package/lib/components/ButtonPanels/EndMeetingButtonPanel/EndMeetingButtonPanel.js +0 -15
- package/lib/components/ButtonPanels/EndMeetingButtonPanel/EndMeetingButtonPanel.js.map +0 -1
- package/lib/components/ButtonPanels/MediaButtonsPanel/MediaButtonsPanel.d.ts +0 -21
- package/lib/components/ButtonPanels/MediaButtonsPanel/MediaButtonsPanel.d.ts.map +0 -1
- package/lib/components/ButtonPanels/MediaButtonsPanel/MediaButtonsPanel.js +0 -34
- package/lib/components/ButtonPanels/MediaButtonsPanel/MediaButtonsPanel.js.map +0 -1
- package/lib/components/ButtonPanels/MediaButtonsPanel/MediaButtonsPanel.scss +0 -31
- package/lib/components/ButtonPanels/MultipartyButton/MultipartyButton.d.ts +0 -18
- package/lib/components/ButtonPanels/MultipartyButton/MultipartyButton.d.ts.map +0 -1
- package/lib/components/ButtonPanels/MultipartyButton/MultipartyButton.js +0 -35
- package/lib/components/ButtonPanels/MultipartyButton/MultipartyButton.js.map +0 -1
- package/lib/components/ButtonPanels/PinButtonPanel/PinButtonPanel.d.ts +0 -10
- package/lib/components/ButtonPanels/PinButtonPanel/PinButtonPanel.d.ts.map +0 -1
- package/lib/components/ButtonPanels/PinButtonPanel/PinButtonPanel.js +0 -22
- package/lib/components/ButtonPanels/PinButtonPanel/PinButtonPanel.js.map +0 -1
- package/lib/components/ButtonPanels/SnapshotButtonPanel/SnapshotButtonPanel.d.ts +0 -9
- package/lib/components/ButtonPanels/SnapshotButtonPanel/SnapshotButtonPanel.d.ts.map +0 -1
- package/lib/components/ButtonPanels/SnapshotButtonPanel/SnapshotButtonPanel.js +0 -15
- package/lib/components/ButtonPanels/SnapshotButtonPanel/SnapshotButtonPanel.js.map +0 -1
- package/lib/components/ButtonPanels/SnapshotButtonPanel/SnapshotButtonPanel.scss +0 -6
- package/lib/components/ButtonPanels/index.d.ts +0 -6
- package/lib/components/ButtonPanels/index.d.ts.map +0 -1
- package/lib/components/ButtonPanels/index.js +0 -14
- package/lib/components/ButtonPanels/index.js.map +0 -1
- package/lib/components/LoaderSpinner/LoaderSpinner.d.ts +0 -8
- package/lib/components/LoaderSpinner/LoaderSpinner.d.ts.map +0 -1
- package/lib/components/LoaderSpinner/LoaderSpinner.js +0 -22
- package/lib/components/LoaderSpinner/LoaderSpinner.js.map +0 -1
- package/lib/components/LoaderSpinner/LoaderSpinner.scss +0 -69
- package/lib/components/MagicMarker/MagicMarker.scss +0 -18
- package/lib/components/MagicMarker/MagicMarkerComponent.d.ts +0 -36
- package/lib/components/MagicMarker/MagicMarkerComponent.d.ts.map +0 -1
- package/lib/components/MagicMarker/MagicMarkerComponent.js +0 -111
- package/lib/components/MagicMarker/MagicMarkerComponent.js.map +0 -1
- package/lib/components/MagicMarker/index.d.ts +0 -2
- package/lib/components/MagicMarker/index.d.ts.map +0 -1
- package/lib/components/MagicMarker/index.js +0 -6
- package/lib/components/MagicMarker/index.js.map +0 -1
- package/lib/components/MediaRejectedModal/MediaRejectedModal.d.ts +0 -24
- package/lib/components/MediaRejectedModal/MediaRejectedModal.d.ts.map +0 -1
- package/lib/components/MediaRejectedModal/MediaRejectedModal.js +0 -45
- package/lib/components/MediaRejectedModal/MediaRejectedModal.js.map +0 -1
- package/lib/components/MediaRejectedModal/MediaRejectedModal.scss +0 -75
- package/lib/components/Multiparty.d.ts.map +0 -1
- package/lib/components/Multiparty.scss +0 -8
- package/lib/components/Multiparty.types.d.ts +0 -11
- package/lib/components/Multiparty.types.d.ts.map +0 -1
- package/lib/components/Multiparty.types.js +0 -9
- package/lib/components/Multiparty.types.js.map +0 -1
- package/lib/components/Video/Video.d.ts +0 -22
- package/lib/components/Video/Video.d.ts.map +0 -1
- package/lib/components/Video/Video.js +0 -23
- package/lib/components/Video/Video.js.map +0 -1
- package/lib/components/Video/Video.scss +0 -10
- package/lib/components/Video/VideoPlaceholder.d.ts +0 -23
- package/lib/components/Video/VideoPlaceholder.d.ts.map +0 -1
- package/lib/components/Video/VideoPlaceholder.js +0 -30
- package/lib/components/Video/VideoPlaceholder.js.map +0 -1
- package/lib/components/VideoLayouts/AgentPinnedLayout/AgentPinnedLayout.d.ts +0 -23
- package/lib/components/VideoLayouts/AgentPinnedLayout/AgentPinnedLayout.d.ts.map +0 -1
- package/lib/components/VideoLayouts/AgentPinnedLayout/AgentPinnedLayout.js +0 -35
- package/lib/components/VideoLayouts/AgentPinnedLayout/AgentPinnedLayout.js.map +0 -1
- package/lib/components/VideoLayouts/AgentPinnedLayout/AgentPinnedLayout.scss +0 -49
- package/lib/components/VideoLayouts/BigMainVideoLayout/BigAreaLandscapeLayout.d.ts +0 -17
- package/lib/components/VideoLayouts/BigMainVideoLayout/BigAreaLandscapeLayout.d.ts.map +0 -1
- package/lib/components/VideoLayouts/BigMainVideoLayout/BigAreaLandscapeLayout.js +0 -75
- package/lib/components/VideoLayouts/BigMainVideoLayout/BigAreaLandscapeLayout.js.map +0 -1
- package/lib/components/VideoLayouts/BigMainVideoLayout/BigAreaLandscapeLayout.scss +0 -46
- package/lib/components/VideoLayouts/BigMainVideoLayout/BigAreaLayout.d.ts +0 -46
- package/lib/components/VideoLayouts/BigMainVideoLayout/BigAreaLayout.d.ts.map +0 -1
- package/lib/components/VideoLayouts/BigMainVideoLayout/BigAreaLayout.js +0 -41
- package/lib/components/VideoLayouts/BigMainVideoLayout/BigAreaLayout.js.map +0 -1
- package/lib/components/VideoLayouts/BigMainVideoLayout/BigAreaLayout.scss +0 -94
- package/lib/components/VideoLayouts/BigMainVideoLayout/BigAreaLayoutPortrait.d.ts +0 -17
- package/lib/components/VideoLayouts/BigMainVideoLayout/BigAreaLayoutPortrait.d.ts.map +0 -1
- package/lib/components/VideoLayouts/BigMainVideoLayout/BigAreaLayoutPortrait.js +0 -75
- package/lib/components/VideoLayouts/BigMainVideoLayout/BigAreaLayoutPortrait.js.map +0 -1
- package/lib/components/VideoLayouts/BigMainVideoLayout/BigAreaPortraitLayout.scss +0 -61
- package/lib/components/VideoLayouts/VideoLayoutManager.d.ts +0 -33
- package/lib/components/VideoLayouts/VideoLayoutManager.d.ts.map +0 -1
- package/lib/components/VideoLayouts/VideoLayoutManager.js +0 -53
- package/lib/components/VideoLayouts/VideoLayoutManager.js.map +0 -1
- package/lib/components/VideoLayouts/index.d.ts +0 -2
- package/lib/components/VideoLayouts/index.d.ts.map +0 -1
- package/lib/components/VideoLayouts/index.js +0 -6
- package/lib/components/VideoLayouts/index.js.map +0 -1
- package/lib/components/VideoPlaceholders/BigAreaMediaPermissionDeniedPlaceholder.d.ts +0 -12
- package/lib/components/VideoPlaceholders/BigAreaMediaPermissionDeniedPlaceholder.d.ts.map +0 -1
- package/lib/components/VideoPlaceholders/BigAreaMediaPermissionDeniedPlaceholder.js +0 -36
- package/lib/components/VideoPlaceholders/BigAreaMediaPermissionDeniedPlaceholder.js.map +0 -1
- package/lib/components/VideoPlaceholders/BigAreaMediaPermissionDeniedPlaceholder.scss +0 -34
- package/lib/components/VideoPlaceholders/CameraOffButton.d.ts +0 -4
- package/lib/components/VideoPlaceholders/CameraOffButton.d.ts.map +0 -1
- package/lib/components/VideoPlaceholders/CameraOffButton.js +0 -9
- package/lib/components/VideoPlaceholders/CameraOffButton.js.map +0 -1
- package/lib/components/VideoPlaceholders/SmallAreaMediaPermissionDeniedPlaceholder.d.ts +0 -12
- package/lib/components/VideoPlaceholders/SmallAreaMediaPermissionDeniedPlaceholder.d.ts.map +0 -1
- package/lib/components/VideoPlaceholders/SmallAreaMediaPermissionDeniedPlaceholder.js +0 -40
- package/lib/components/VideoPlaceholders/SmallAreaMediaPermissionDeniedPlaceholder.js.map +0 -1
- package/lib/components/VideoPlaceholders/SmallAreaMediaPermissionDeniedPlaceholder.scss +0 -15
- package/lib/components/VideoPlaceholders/Tooltip.scss +0 -65
- package/lib/index.d.ts.map +0 -1
- package/lib/services/ConnectionManager.d.ts +0 -29
- package/lib/services/ConnectionManager.d.ts.map +0 -1
- package/lib/services/ConnectionManager.js +0 -146
- package/lib/services/ConnectionManager.js.map +0 -1
- package/lib/services/MediaStateService.d.ts +0 -25
- package/lib/services/MediaStateService.d.ts.map +0 -1
- package/lib/services/MediaStateService.js +0 -84
- package/lib/services/MediaStateService.js.map +0 -1
- package/lib/services/MultipartyController.d.ts +0 -31
- package/lib/services/MultipartyController.d.ts.map +0 -1
- package/lib/services/MultipartyController.js +0 -357
- package/lib/services/MultipartyController.js.map +0 -1
- package/lib/services/MultipartyEventTypes.d.ts +0 -92
- package/lib/services/MultipartyEventTypes.d.ts.map +0 -1
- package/lib/services/MultipartyEventTypes.js +0 -19
- package/lib/services/MultipartyEventTypes.js.map +0 -1
- package/lib/services/trafficLogManager.d.ts +0 -21
- package/lib/services/trafficLogManager.d.ts.map +0 -1
- package/lib/services/trafficLogManager.js +0 -130
- package/lib/services/trafficLogManager.js.map +0 -1
- package/lib/services/types.d.ts +0 -50
- package/lib/services/types.d.ts.map +0 -1
- package/lib/services/types.js +0 -47
- package/lib/services/types.js.map +0 -1
- package/lib/utils/ClientConstants.d.ts +0 -5
- package/lib/utils/ClientConstants.d.ts.map +0 -1
- package/lib/utils/ClientConstants.js +0 -8
- package/lib/utils/ClientConstants.js.map +0 -1
- package/lib/utils/MergingStore.d.ts +0 -11
- package/lib/utils/MergingStore.d.ts.map +0 -1
- package/lib/utils/MergingStore.js +0 -108
- package/lib/utils/MergingStore.js.map +0 -1
- package/lib/utils/detectOsType.d.ts +0 -8
- package/lib/utils/detectOsType.d.ts.map +0 -1
- package/lib/utils/detectOsType.js +0 -23
- package/lib/utils/detectOsType.js.map +0 -1
- package/lib/utils/index.d.ts +0 -5
- package/lib/utils/index.d.ts.map +0 -1
- package/lib/utils/index.js +0 -14
- package/lib/utils/index.js.map +0 -1
- package/lib/utils/useEvent.d.ts +0 -4
- package/lib/utils/useEvent.d.ts.map +0 -1
- package/lib/utils/useEvent.js +0 -20
- package/lib/utils/useEvent.js.map +0 -1
|
@@ -1,23 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import '@techsee/techsee-ui-common/lib/_shared/icons.css';
|
|
7
|
-
import './Multiparty.scss';
|
|
8
|
-
declare type MultipartyProps = {
|
|
9
|
-
controller: IMultipartyController;
|
|
10
|
-
translations: MultipartyTranslationStrings;
|
|
11
|
-
selectedLayoutType: VideoLayoutType;
|
|
12
|
-
isPeerMediaPermissionRejected?: boolean;
|
|
13
|
-
onPermissionsModalVisibilityChanged?: OnPermissionsModalVisibilityChangedCb;
|
|
14
|
-
onPinnedVideoChanged?: OnPinnedVideoChangedCb;
|
|
15
|
-
onSnapshotRequested?: OnSnapshotRequestedCb;
|
|
16
|
-
onEndMeetingRequested?: OnEndMeetingRequestedCb;
|
|
17
|
-
videoOverlay?: (props: {
|
|
18
|
-
floatingElements: RefObject<HTMLElement>[];
|
|
19
|
-
}) => JSX.Element;
|
|
20
|
-
};
|
|
21
|
-
export declare const Multiparty: React.FC<MultipartyProps>;
|
|
22
|
-
export {};
|
|
23
|
-
//# sourceMappingURL=Multiparty.d.ts.map
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WebRtcClient } from '../services/WebRTCClient';
|
|
3
|
+
export declare const Multiparty: React.FC<{
|
|
4
|
+
webRtcClient: WebRtcClient;
|
|
5
|
+
}>;
|
|
@@ -1,194 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import { CameraTypes } from '@techsee/techsee-media-service/lib/MediaConstants';
|
|
3
|
+
export var Multiparty = function (props) {
|
|
4
|
+
useEffect(function () {
|
|
5
|
+
props.webRtcClient.init();
|
|
6
|
+
setTimeout(function () {
|
|
7
|
+
props.webRtcClient.switchCamera(CameraTypes.BACK);
|
|
8
|
+
}, 5000);
|
|
9
|
+
}, []);
|
|
10
|
+
return (React.createElement("div", { id: "videos" },
|
|
11
|
+
React.createElement("div", { id: "participate1" }),
|
|
12
|
+
React.createElement("div", { id: "participate0" })));
|
|
12
13
|
};
|
|
13
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
-
function step(op) {
|
|
27
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (_) try {
|
|
29
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
-
switch (op[0]) {
|
|
32
|
-
case 0: case 1: t = op; break;
|
|
33
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
-
default:
|
|
37
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
-
if (t[2]) _.ops.pop();
|
|
42
|
-
_.trys.pop(); continue;
|
|
43
|
-
}
|
|
44
|
-
op = body.call(thisArg, _);
|
|
45
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
-
exports.Multiparty = void 0;
|
|
51
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
52
|
-
var react_1 = require("react");
|
|
53
|
-
var MediaConstants_1 = require("@techsee/techsee-media-service/lib/MediaConstants");
|
|
54
|
-
var MultiParty_1 = require("@techsee/techsee-media-service/lib/MultiParty");
|
|
55
|
-
var media_constants_1 = require("@techsee/techsee-common/lib/constants/media.constants");
|
|
56
|
-
var MultipartyController_1 = require("../services/MultipartyController");
|
|
57
|
-
var types_1 = require("../services/types");
|
|
58
|
-
var utils_1 = require("../utils");
|
|
59
|
-
var MultipartyEventTypes_1 = require("../services/MultipartyEventTypes");
|
|
60
|
-
var MediaRejectedModal_1 = require("./MediaRejectedModal/MediaRejectedModal");
|
|
61
|
-
var Multiparty_types_1 = require("./Multiparty.types");
|
|
62
|
-
var VideoLayouts_1 = require("./VideoLayouts");
|
|
63
|
-
require("@techsee/techsee-ui-common/lib/_shared/icons.css");
|
|
64
|
-
require("./Multiparty.scss");
|
|
65
|
-
var Multiparty = function (_a) {
|
|
66
|
-
var controller = _a.controller, translations = _a.translations, isPeerMediaPermissionRejected = _a.isPeerMediaPermissionRejected, selectedLayoutType = _a.selectedLayoutType, onPermissionsModalVisibilityChanged = _a.onPermissionsModalVisibilityChanged, onPinnedVideoChanged = _a.onPinnedVideoChanged, onSnapshotRequested = _a.onSnapshotRequested, onEndMeetingRequested = _a.onEndMeetingRequested, videoOverlay = _a.videoOverlay;
|
|
67
|
-
var _b = react_1.useState(false), firstPeerDidConnect = _b[0], setFirstPeerDidConnect = _b[1];
|
|
68
|
-
var _c = react_1.useState(true), wasMediaPermissionsModalClosed = _c[0], setWasMediaPermissionsModalClosed = _c[1];
|
|
69
|
-
var _d = react_1.useState(false), isOwnMediaPermissionsRejected = _d[0], setOwnMediaPermissionsRejected = _d[1];
|
|
70
|
-
var _e = react_1.useState(controller.userRole), userRole = _e[0], setUserRole = _e[1];
|
|
71
|
-
var _f = react_1.useState({
|
|
72
|
-
pinnedUserRole: controller.getPinnedVideo().pinnedUserRole,
|
|
73
|
-
videoType: controller.getPinnedVideo().videoType
|
|
74
|
-
}), pinnedVideo = _f[0], setPinnedVideo = _f[1];
|
|
75
|
-
var _g = react_1.useState(controller.isAudioDisabled), isAudioDisabled = _g[0], setIsAudioDisabled = _g[1];
|
|
76
|
-
var _h = react_1.useState(false), isAudioMuted = _h[0], setIsAudioMuted = _h[1];
|
|
77
|
-
var _j = react_1.useState(false), isVideoTurnedOff = _j[0], setIsVideoTurnedOff = _j[1];
|
|
78
|
-
var _k = react_1.useState(false), isSwitchCameraSupported = _k[0], setIsSwitchCameraSupported = _k[1];
|
|
79
|
-
var _l = react_1.useState(true), isLoading = _l[0], setIsLoading = _l[1];
|
|
80
|
-
var _m = react_1.useState(false), isScreenSharingEnabled = _m[0], setIsScreenSharingEnabled = _m[1];
|
|
81
|
-
var _o = react_1.useState([]), connections = _o[0], setConnections = _o[1];
|
|
82
|
-
var toggleMute = react_1.useCallback(function () { return controller.toggleAudio(isAudioMuted); }, [controller, isAudioMuted]);
|
|
83
|
-
var switchCamera = react_1.useCallback(function () { return controller.switchCamera(); }, [controller]);
|
|
84
|
-
var toggleVideo = react_1.useCallback(function () { return controller.toggleVideo(isVideoTurnedOff); }, [controller, isVideoTurnedOff]);
|
|
85
|
-
var onModalClosed = react_1.useCallback(function () { return setWasMediaPermissionsModalClosed(false); }, []);
|
|
86
|
-
var onModalOpen = react_1.useCallback(function () { return setWasMediaPermissionsModalClosed(true); }, []);
|
|
87
|
-
react_1.useEffect(function () {
|
|
88
|
-
controller.connect();
|
|
89
|
-
setConnections(controller.connections.get());
|
|
90
|
-
return function () { return controller.disconnect(); };
|
|
91
|
-
}, [controller]);
|
|
92
|
-
react_1.useEffect(function () {
|
|
93
|
-
onPermissionsModalVisibilityChanged === null || onPermissionsModalVisibilityChanged === void 0 ? void 0 : onPermissionsModalVisibilityChanged(isOwnMediaPermissionsRejected && wasMediaPermissionsModalClosed
|
|
94
|
-
? Multiparty_types_1.PermissionsModalVisibilityChangedEvent.MODAL_OPEN
|
|
95
|
-
: Multiparty_types_1.PermissionsModalVisibilityChangedEvent.MODAL_CLOSED);
|
|
96
|
-
}, [isOwnMediaPermissionsRejected, wasMediaPermissionsModalClosed, onPermissionsModalVisibilityChanged]);
|
|
97
|
-
react_1.useEffect(function () {
|
|
98
|
-
controller.connections.setOwnMediaPermissionsRejected(isOwnMediaPermissionsRejected);
|
|
99
|
-
setConnections(controller.connections.get());
|
|
100
|
-
}, [controller, isOwnMediaPermissionsRejected]);
|
|
101
|
-
react_1.useEffect(function () {
|
|
102
|
-
controller.connections.setPeerMediaPermissionsRejected(isPeerMediaPermissionRejected || false);
|
|
103
|
-
setConnections(controller.connections.get());
|
|
104
|
-
}, [controller, isPeerMediaPermissionRejected]);
|
|
105
|
-
react_1.useEffect(function () {
|
|
106
|
-
setUserRole(controller.userRole);
|
|
107
|
-
}, [controller.userRole]);
|
|
108
|
-
react_1.useEffect(function () {
|
|
109
|
-
setIsAudioDisabled(controller.isAudioDisabled);
|
|
110
|
-
}, [controller.isAudioDisabled]);
|
|
111
|
-
react_1.useEffect(function () {
|
|
112
|
-
var checkScreenSharing = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
113
|
-
var isSharingEnabled;
|
|
114
|
-
return __generator(this, function (_a) {
|
|
115
|
-
switch (_a.label) {
|
|
116
|
-
case 0:
|
|
117
|
-
if (!(selectedLayoutType !== media_constants_1.VideoLayoutType.AgentPinnedLayout)) return [3 /*break*/, 2];
|
|
118
|
-
return [4 /*yield*/, controller.isScreenSharingEnabled()];
|
|
119
|
-
case 1:
|
|
120
|
-
isSharingEnabled = _a.sent();
|
|
121
|
-
setIsScreenSharingEnabled(isSharingEnabled);
|
|
122
|
-
_a.label = 2;
|
|
123
|
-
case 2:
|
|
124
|
-
setIsLoading(false);
|
|
125
|
-
return [2 /*return*/];
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
}); };
|
|
129
|
-
checkScreenSharing();
|
|
130
|
-
}, []);
|
|
131
|
-
utils_1.useEvent(controller, MultipartyController_1.MultipartyEventsInternal.setPinnedVideo, function (newPinnedVideo) {
|
|
132
|
-
setPinnedVideo({ pinnedUserRole: newPinnedVideo.pinnedUserRole, videoType: newPinnedVideo.videoType });
|
|
133
|
-
}, [Object.values(pinnedVideo)]);
|
|
134
|
-
utils_1.useEvent(controller, MultipartyEventTypes_1.MultipartyEvents.connectionCreated, function () {
|
|
135
|
-
var updatedConnections = controller.connections.get();
|
|
136
|
-
setConnections(updatedConnections);
|
|
137
|
-
if (updatedConnections.length > 1) {
|
|
138
|
-
setFirstPeerDidConnect(true);
|
|
139
|
-
}
|
|
140
|
-
}, []);
|
|
141
|
-
utils_1.useEvent(controller, MultipartyEventTypes_1.MultipartyEvents.connectionDestroyed, function () {
|
|
142
|
-
setConnections(controller.connections.get());
|
|
143
|
-
}, []);
|
|
144
|
-
utils_1.useEvent(controller, MultipartyEventTypes_1.MultipartyEvents.streamCreated, function (_a) {
|
|
145
|
-
var isOwnConnection = _a.isOwnConnection, hasAudio = _a.hasAudio, hasVideo = _a.hasVideo;
|
|
146
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
147
|
-
var supportsCameraSwitch;
|
|
148
|
-
return __generator(this, function (_b) {
|
|
149
|
-
switch (_b.label) {
|
|
150
|
-
case 0:
|
|
151
|
-
setConnections(controller.connections.get());
|
|
152
|
-
if (!isOwnConnection) return [3 /*break*/, 2];
|
|
153
|
-
return [4 /*yield*/, MultiParty_1.checkSupportSwitchCamera()];
|
|
154
|
-
case 1:
|
|
155
|
-
supportsCameraSwitch = _b.sent();
|
|
156
|
-
setIsSwitchCameraSupported(supportsCameraSwitch);
|
|
157
|
-
setIsAudioMuted(!hasAudio);
|
|
158
|
-
setIsVideoTurnedOff(!hasVideo);
|
|
159
|
-
_b.label = 2;
|
|
160
|
-
case 2: return [2 /*return*/];
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
});
|
|
164
|
-
}, []);
|
|
165
|
-
utils_1.useEvent(controller, MultipartyEventTypes_1.MultipartyEvents.streamPropertyChanged, function (_a) {
|
|
166
|
-
var isOwnConnection = _a.isOwnConnection, hasAudio = _a.hasAudio, hasVideo = _a.hasVideo;
|
|
167
|
-
setConnections(controller.connections.get());
|
|
168
|
-
if (isOwnConnection) {
|
|
169
|
-
setIsAudioMuted(!hasAudio);
|
|
170
|
-
setIsVideoTurnedOff(!hasVideo);
|
|
171
|
-
}
|
|
172
|
-
}, []);
|
|
173
|
-
utils_1.useEvent(controller, MultipartyEventTypes_1.MultipartyEvents.mediaDeviceAccessDenied, function (_a) {
|
|
174
|
-
var isOwnConnection = _a.isOwnConnection;
|
|
175
|
-
setConnections(controller.connections.get());
|
|
176
|
-
if (isOwnConnection) {
|
|
177
|
-
setOwnMediaPermissionsRejected(true);
|
|
178
|
-
}
|
|
179
|
-
}, []);
|
|
180
|
-
var MediaRejectedModalWithProps = function () {
|
|
181
|
-
if (controller.userRole === MediaConstants_1.SessionClientRole.USER &&
|
|
182
|
-
isOwnMediaPermissionsRejected &&
|
|
183
|
-
wasMediaPermissionsModalClosed) {
|
|
184
|
-
return jsx_runtime_1.jsx(MediaRejectedModal_1.MediaRejectedModal, { osType: utils_1.detectOSType(), translations: translations, onClose: onModalClosed }, void 0);
|
|
185
|
-
}
|
|
186
|
-
return null;
|
|
187
|
-
};
|
|
188
|
-
return isLoading ? null : (jsx_runtime_1.jsxs("div", __assign({ className: 'mutltiparty-container' }, { children: [jsx_runtime_1.jsx(MediaRejectedModalWithProps, {}, void 0), jsx_runtime_1.jsx(VideoLayouts_1.VideoLayoutManager, { connections: connections, selectedLayoutType: selectedLayoutType, userRole: userRole, pinnedVideo: {
|
|
189
|
-
pinnedUserRole: types_1.toSessionClientRole(pinnedVideo.pinnedUserRole),
|
|
190
|
-
videoType: pinnedVideo.videoType
|
|
191
|
-
}, translations: translations, firstPeerConnected: firstPeerDidConnect, onModalOpen: onModalOpen, onToggleMute: !isAudioDisabled ? toggleMute : undefined, isAudioMuted: isAudioMuted, onToggleVideo: toggleVideo, isVideoTurnedOff: isVideoTurnedOff, onVideoPinned: onPinnedVideoChanged, onSwitchCamera: isSwitchCameraSupported ? switchCamera : undefined, onSnapshotRequested: onSnapshotRequested, onEndMeetingRequested: onEndMeetingRequested, videoOverlay: videoOverlay, isScreenSharingEnabled: isScreenSharingEnabled }, void 0)] }), void 0));
|
|
192
|
-
};
|
|
193
|
-
exports.Multiparty = Multiparty;
|
|
194
14
|
//# sourceMappingURL=Multiparty.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Multiparty.js","sourceRoot":"","sources":["../../src/components/Multiparty.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Multiparty.js","sourceRoot":"","sources":["../../src/components/Multiparty.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAC,WAAW,EAAC,MAAM,mDAAmD,CAAC;AAE9E,MAAM,CAAC,IAAM,UAAU,GAA4C,UAAC,KAAK;IACrE,SAAS,CAAC;QACN,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;QAC1B,UAAU,CAAC;YACP,KAAK,CAAC,YAAY,CAAC,YAAY,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACtD,CAAC,EAAE,IAAI,CAAC,CAAC;IACb,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACH,6BAAK,EAAE,EAAC,QAAQ;QACZ,6BAAK,EAAE,EAAC,cAAc,GAAE;QACxB,6BAAK,EAAE,EAAC,cAAc,GAAE,CACtB,CACT,CAAC;AACN,CAAC,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
export * from './services/MultipartyEventTypes';
|
|
2
1
|
export { Multiparty } from './components/Multiparty';
|
|
3
|
-
export {
|
|
4
|
-
export { MagicMarkerComponent, MagicMarkerOptions, MagicMarkerComponentProps } from './components/MagicMarker';
|
|
5
|
-
export { MultipartySessionSettings, AudioState, PinnedUserType, OnPinnedVideoChangedCb } from './services/types';
|
|
6
|
-
export { createMultipartyController, IMultipartyController } from './services/MultipartyController';
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
2
|
+
export { WebRtcClient, WebRtcClientEvents } from './services/WebRTCClient';
|
package/lib/index.js
CHANGED
|
@@ -1,26 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.createMultipartyController = exports.PinnedUserType = exports.AudioState = exports.MagicMarkerComponent = exports.PermissionsModalVisibilityChangedEvent = exports.Multiparty = void 0;
|
|
14
|
-
__exportStar(require("./services/MultipartyEventTypes"), exports);
|
|
15
|
-
var Multiparty_1 = require("./components/Multiparty");
|
|
16
|
-
Object.defineProperty(exports, "Multiparty", { enumerable: true, get: function () { return Multiparty_1.Multiparty; } });
|
|
17
|
-
var Multiparty_types_1 = require("./components/Multiparty.types");
|
|
18
|
-
Object.defineProperty(exports, "PermissionsModalVisibilityChangedEvent", { enumerable: true, get: function () { return Multiparty_types_1.PermissionsModalVisibilityChangedEvent; } });
|
|
19
|
-
var MagicMarker_1 = require("./components/MagicMarker");
|
|
20
|
-
Object.defineProperty(exports, "MagicMarkerComponent", { enumerable: true, get: function () { return MagicMarker_1.MagicMarkerComponent; } });
|
|
21
|
-
var types_1 = require("./services/types");
|
|
22
|
-
Object.defineProperty(exports, "AudioState", { enumerable: true, get: function () { return types_1.AudioState; } });
|
|
23
|
-
Object.defineProperty(exports, "PinnedUserType", { enumerable: true, get: function () { return types_1.PinnedUserType; } });
|
|
24
|
-
var MultipartyController_1 = require("./services/MultipartyController");
|
|
25
|
-
Object.defineProperty(exports, "createMultipartyController", { enumerable: true, get: function () { return MultipartyController_1.createMultipartyController; } });
|
|
1
|
+
export { Multiparty } from './components/Multiparty';
|
|
2
|
+
export { WebRtcClient, WebRtcClientEvents } from './services/WebRTCClient';
|
|
26
3
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LayoutManager.js","sourceRoot":"","sources":["../../src/services/LayoutManager.ts"],"names":[],"mappings":";AAAA,EAAE"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { ICredentials, ISessionSettings } from '@techsee/techsee-media-service/lib/MultiParty/Contracts';
|
|
3
|
+
import { EventEmitter } from 'events';
|
|
4
|
+
import { CameraTypes } from '@techsee/techsee-media-service/lib/MediaConstants';
|
|
5
|
+
export declare enum WebRtcClientEvents {
|
|
6
|
+
mediaCapabilitiesSupport = "mediaCapabilitiesSupport",
|
|
7
|
+
connectFailed = "connectFailed",
|
|
8
|
+
streamDestroyed = "streamDestroyed",
|
|
9
|
+
connectionCreated = "connectionCreated",
|
|
10
|
+
connectionDestroyed = "connectionDestroyed",
|
|
11
|
+
streamCreated = "streamCreated"
|
|
12
|
+
}
|
|
13
|
+
export declare class WebRtcClient extends EventEmitter {
|
|
14
|
+
private readonly credentials;
|
|
15
|
+
private readonly settings;
|
|
16
|
+
private multiParty?;
|
|
17
|
+
constructor(credentials: ICredentials, settings: ISessionSettings);
|
|
18
|
+
init(): Promise<void>;
|
|
19
|
+
initHandlers(): void;
|
|
20
|
+
disconnect(): void;
|
|
21
|
+
switchCamera(cameraType: CameraTypes): void;
|
|
22
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
20
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
21
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
22
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
26
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
27
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
28
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
29
|
+
function step(op) {
|
|
30
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
31
|
+
while (_) try {
|
|
32
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
33
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
34
|
+
switch (op[0]) {
|
|
35
|
+
case 0: case 1: t = op; break;
|
|
36
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
37
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
38
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
39
|
+
default:
|
|
40
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
41
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
42
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
43
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
44
|
+
if (t[2]) _.ops.pop();
|
|
45
|
+
_.trys.pop(); continue;
|
|
46
|
+
}
|
|
47
|
+
op = body.call(thisArg, _);
|
|
48
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
49
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
import { couldStartMultiparty, MULTI_PARTY_EVENTS } from '@techsee/techsee-media-service/lib/MultiParty/MultiParty';
|
|
53
|
+
import { createMultiParty } from '@techsee/techsee-media-service/lib/MultiParty/MultipartyFactory';
|
|
54
|
+
import { getMediaTracer } from '@techsee/techsee-media-service/lib/MediaUtils/MediaTracer';
|
|
55
|
+
import { EventEmitter } from 'events';
|
|
56
|
+
var trace = getMediaTracer('Multiparty');
|
|
57
|
+
export var WebRtcClientEvents;
|
|
58
|
+
(function (WebRtcClientEvents) {
|
|
59
|
+
WebRtcClientEvents["mediaCapabilitiesSupport"] = "mediaCapabilitiesSupport";
|
|
60
|
+
WebRtcClientEvents["connectFailed"] = "connectFailed";
|
|
61
|
+
WebRtcClientEvents["streamDestroyed"] = "streamDestroyed";
|
|
62
|
+
WebRtcClientEvents["connectionCreated"] = "connectionCreated";
|
|
63
|
+
WebRtcClientEvents["connectionDestroyed"] = "connectionDestroyed";
|
|
64
|
+
WebRtcClientEvents["streamCreated"] = "streamCreated";
|
|
65
|
+
})(WebRtcClientEvents || (WebRtcClientEvents = {}));
|
|
66
|
+
var WebRtcClient = /** @class */ (function (_super) {
|
|
67
|
+
__extends(WebRtcClient, _super);
|
|
68
|
+
function WebRtcClient(credentials, settings) {
|
|
69
|
+
var _this = _super.call(this) || this;
|
|
70
|
+
_this.credentials = credentials;
|
|
71
|
+
_this.settings = settings;
|
|
72
|
+
return _this;
|
|
73
|
+
}
|
|
74
|
+
WebRtcClient.prototype.init = function () {
|
|
75
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
76
|
+
var mediaCapabilitiesSupport;
|
|
77
|
+
return __generator(this, function (_a) {
|
|
78
|
+
switch (_a.label) {
|
|
79
|
+
case 0: return [4 /*yield*/, couldStartMultiparty()];
|
|
80
|
+
case 1:
|
|
81
|
+
mediaCapabilitiesSupport = _a.sent();
|
|
82
|
+
this.emit(WebRtcClientEvents.mediaCapabilitiesSupport, mediaCapabilitiesSupport);
|
|
83
|
+
trace.info('Media Capabilities support', mediaCapabilitiesSupport);
|
|
84
|
+
if (mediaCapabilitiesSupport) {
|
|
85
|
+
this.multiParty = createMultiParty(this.settings);
|
|
86
|
+
this.initHandlers();
|
|
87
|
+
return [2 /*return*/, this.multiParty.connect(this.credentials)];
|
|
88
|
+
}
|
|
89
|
+
throw new Error('No WebRtc support');
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
WebRtcClient.prototype.initHandlers = function () {
|
|
95
|
+
var _this = this;
|
|
96
|
+
this.multiParty.on(MULTI_PARTY_EVENTS.connectFailed, function (event) {
|
|
97
|
+
_this.emit(WebRtcClientEvents.connectFailed, event);
|
|
98
|
+
});
|
|
99
|
+
this.multiParty.on(MULTI_PARTY_EVENTS.connectionCreated, function (event) {
|
|
100
|
+
_this.emit(WebRtcClientEvents.connectionCreated, event);
|
|
101
|
+
});
|
|
102
|
+
this.multiParty.on(MULTI_PARTY_EVENTS.connectionDestroyed, function (event) {
|
|
103
|
+
_this.emit(WebRtcClientEvents.connectionDestroyed, event);
|
|
104
|
+
});
|
|
105
|
+
this.multiParty.on(MULTI_PARTY_EVENTS.streamDestroyed, function (event) {
|
|
106
|
+
_this.emit(WebRtcClientEvents.streamDestroyed, event);
|
|
107
|
+
});
|
|
108
|
+
this.multiParty.on(MULTI_PARTY_EVENTS.streamCreated, function (event) {
|
|
109
|
+
_this.emit(WebRtcClientEvents.streamCreated, event);
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
WebRtcClient.prototype.disconnect = function () {
|
|
113
|
+
var _a;
|
|
114
|
+
(_a = this.multiParty) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
115
|
+
};
|
|
116
|
+
WebRtcClient.prototype.switchCamera = function (cameraType) {
|
|
117
|
+
var _a;
|
|
118
|
+
(_a = this.multiParty) === null || _a === void 0 ? void 0 : _a.switchCamera(cameraType);
|
|
119
|
+
};
|
|
120
|
+
return WebRtcClient;
|
|
121
|
+
}(EventEmitter));
|
|
122
|
+
export { WebRtcClient };
|
|
123
|
+
//# sourceMappingURL=WebRTCClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebRTCClient.js","sourceRoot":"","sources":["../../src/services/WebRTCClient.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Multiparty } from '../components/Multiparty';
|
|
3
|
+
import { CameraTypes, MediaServiceType } from '@techsee/techsee-media-service/lib/MediaConstants';
|
|
4
|
+
import { WebRtcClient } from '../services/WebRTCClient';
|
|
5
|
+
var env = require('../../env.json');
|
|
6
|
+
var _a = env.storybook, apiKey = _a.apiKey, sessionId = _a.sessionId, token = _a.token;
|
|
7
|
+
export default {
|
|
8
|
+
title: 'Multiparty demo',
|
|
9
|
+
component: Multiparty,
|
|
10
|
+
};
|
|
11
|
+
var args = {
|
|
12
|
+
credentials: {
|
|
13
|
+
sessionId: sessionId,
|
|
14
|
+
apiKey: apiKey,
|
|
15
|
+
token: token
|
|
16
|
+
},
|
|
17
|
+
settings: {
|
|
18
|
+
defaultCamera: CameraTypes.FRONT,
|
|
19
|
+
startWithAudioMuted: false,
|
|
20
|
+
mediaServiceType: MediaServiceType.OPENTOK
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
var Template = function () { return React.createElement(Multiparty, { webRtcClient: new WebRtcClient(args.credentials, args.settings) }); };
|
|
24
|
+
export var multiparty = Template.bind({});
|
|
25
|
+
//# sourceMappingURL=Multiparty.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Multiparty.stories.js","sourceRoot":"","sources":["../../src/stories/Multiparty.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,UAAU,EAAC,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAC,WAAW,EAAE,gBAAgB,EAAC,MAAM,mDAAmD,CAAC;AAChG,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AAEtD,IAAM,GAAG,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAChC,IAAA,KAA6B,GAAG,CAAC,SAAS,EAAzC,MAAM,YAAA,EAAE,SAAS,eAAA,EAAE,KAAK,WAAiB,CAAC;AAEjD,eAAe;IACX,KAAK,EAAE,iBAAiB;IACxB,SAAS,EAAE,UAAU;CAChB,CAAC;AACV,IAAM,IAAI,GAAG;IACT,WAAW,EAAE;QACT,SAAS,EAAE,SAAS;QACpB,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,KAAK;KACf;IACD,QAAQ,EAAE;QACN,aAAa,EAAE,WAAW,CAAC,KAAK;QAChC,mBAAmB,EAAE,KAAK;QAC1B,gBAAgB,EAAE,gBAAgB,CAAC,OAAO;KAC7C;CACJ,CAAC;AAEF,IAAM,QAAQ,GAAU,cAAM,OAAA,oBAAC,UAAU,IAAC,YAAY,EAAE,IAAI,YAAY,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,EAA9E,CAA8E,CAAC;AAE7G,MAAM,CAAC,IAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC"}
|