@techsee/techsee-media-service 999.17.1111-alphasa01 → 999.17.3333-alphasa01
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/package.json +12 -11
- package/lib/Live3/DetectWebRtcService.d.ts +0 -19
- package/lib/Live3/DetectWebRtcService.d.ts.map +0 -1
- package/lib/Live3/DetectWebRtcService.js +0 -132
- package/lib/Live3/DetectWebRtcService.js.map +0 -1
- package/lib/Live3/MediaCapabilitiesService.d.ts +0 -18
- package/lib/Live3/MediaCapabilitiesService.d.ts.map +0 -1
- package/lib/Live3/MediaCapabilitiesService.js +0 -210
- package/lib/Live3/MediaCapabilitiesService.js.map +0 -1
- package/lib/Live3/MediaCapabilitiesUtils.d.ts +0 -6
- package/lib/Live3/MediaCapabilitiesUtils.d.ts.map +0 -1
- package/lib/Live3/MediaCapabilitiesUtils.js +0 -143
- package/lib/Live3/MediaCapabilitiesUtils.js.map +0 -1
- package/lib/Live3/MediaTracer.d.ts +0 -4
- package/lib/Live3/MediaTracer.d.ts.map +0 -1
- package/lib/Live3/MediaTracer.js +0 -10
- package/lib/Live3/MediaTracer.js.map +0 -1
- package/lib/Live3/MultiPartyService.d.ts +0 -47
- package/lib/Live3/MultiPartyService.d.ts.map +0 -1
- package/lib/Live3/MultiPartyService.js +0 -31
- package/lib/Live3/MultiPartyService.js.map +0 -1
- package/lib/Live3/MultiPartyServiceFactory.d.ts +0 -4
- package/lib/Live3/MultiPartyServiceFactory.d.ts.map +0 -1
- package/lib/Live3/MultiPartyServiceFactory.js +0 -13
- package/lib/Live3/MultiPartyServiceFactory.js.map +0 -1
- package/lib/Live3/MultipartyServiceEventTypes.d.ts +0 -103
- package/lib/Live3/MultipartyServiceEventTypes.d.ts.map +0 -1
- package/lib/Live3/MultipartyServiceEventTypes.js +0 -20
- package/lib/Live3/MultipartyServiceEventTypes.js.map +0 -1
- package/lib/Live3/opentok/OpentokMultiPartyService.d.ts +0 -43
- package/lib/Live3/opentok/OpentokMultiPartyService.d.ts.map +0 -1
- package/lib/Live3/opentok/OpentokMultiPartyService.js +0 -607
- package/lib/Live3/opentok/OpentokMultiPartyService.js.map +0 -1
- package/lib/Live3/opentok/OpentokPublisher.d.ts +0 -38
- package/lib/Live3/opentok/OpentokPublisher.d.ts.map +0 -1
- package/lib/Live3/opentok/OpentokPublisher.js +0 -304
- package/lib/Live3/opentok/OpentokPublisher.js.map +0 -1
- package/lib/Live3/opentok/OpentokPublisherEventMapper.d.ts +0 -19
- package/lib/Live3/opentok/OpentokPublisherEventMapper.d.ts.map +0 -1
- package/lib/Live3/opentok/OpentokPublisherEventMapper.js +0 -50
- package/lib/Live3/opentok/OpentokPublisherEventMapper.js.map +0 -1
- package/lib/Live3/opentok/OpentokSubscriber.d.ts +0 -5
- package/lib/Live3/opentok/OpentokSubscriber.d.ts.map +0 -1
- package/lib/Live3/opentok/OpentokSubscriber.js +0 -33
- package/lib/Live3/opentok/OpentokSubscriber.js.map +0 -1
- package/lib/Live3/opentok/mocks/OpentokPublisher.d.ts +0 -32
- package/lib/Live3/opentok/mocks/OpentokPublisher.d.ts.map +0 -1
- package/lib/Live3/opentok/mocks/OpentokPublisher.js +0 -182
- package/lib/Live3/opentok/mocks/OpentokPublisher.js.map +0 -1
- package/lib/Live3/opentok/mocks/OpentokSession.d.ts +0 -25
- package/lib/Live3/opentok/mocks/OpentokSession.d.ts.map +0 -1
- package/lib/Live3/opentok/mocks/OpentokSession.js +0 -115
- package/lib/Live3/opentok/mocks/OpentokSession.js.map +0 -1
- package/lib/Live3/opentok/mocks/objects.d.ts +0 -26
- package/lib/Live3/opentok/mocks/objects.d.ts.map +0 -1
- package/lib/Live3/opentok/mocks/objects.js +0 -63
- package/lib/Live3/opentok/mocks/objects.js.map +0 -1
- package/lib/Live3/opentok/trace.d.ts +0 -3
- package/lib/Live3/opentok/trace.d.ts.map +0 -1
- package/lib/Live3/opentok/trace.js +0 -24
- package/lib/Live3/opentok/trace.js.map +0 -1
- package/lib/Live3/types.d.ts +0 -55
- package/lib/Live3/types.d.ts.map +0 -1
- package/lib/Live3/types.js +0 -32
- package/lib/Live3/types.js.map +0 -1
- package/lib/Live3/utils.d.ts +0 -5
- package/lib/Live3/utils.d.ts.map +0 -1
- package/lib/Live3/utils.js +0 -16
- package/lib/Live3/utils.js.map +0 -1
- package/lib/Live3-Index.d.ts +0 -7
- package/lib/Live3-Index.d.ts.map +0 -1
- package/lib/Live3-Index.js +0 -25
- package/lib/Live3-Index.js.map +0 -1
- package/lib/LocalStreamManager.d.ts +0 -40
- package/lib/LocalStreamManager.d.ts.map +0 -1
- package/lib/LocalStreamManager.js +0 -441
- package/lib/LocalStreamManager.js.map +0 -1
- package/lib/MediaConstants.d.ts +0 -83
- package/lib/MediaConstants.d.ts.map +0 -1
- package/lib/MediaConstants.js +0 -107
- package/lib/MediaConstants.js.map +0 -1
- package/lib/MediaContracts.d.ts +0 -139
- package/lib/MediaContracts.d.ts.map +0 -1
- package/lib/MediaContracts.js +0 -3
- package/lib/MediaContracts.js.map +0 -1
- package/lib/MediaPublisher.d.ts +0 -15
- package/lib/MediaPublisher.d.ts.map +0 -1
- package/lib/MediaPublisher.js +0 -64
- package/lib/MediaPublisher.js.map +0 -1
- package/lib/MediaServiceBase.d.ts +0 -83
- package/lib/MediaServiceBase.d.ts.map +0 -1
- package/lib/MediaServiceBase.js +0 -1104
- package/lib/MediaServiceBase.js.map +0 -1
- package/lib/MediaSession/MediaServer.d.ts +0 -46
- package/lib/MediaSession/MediaServer.d.ts.map +0 -1
- package/lib/MediaSession/MediaServer.js +0 -533
- package/lib/MediaSession/MediaServer.js.map +0 -1
- package/lib/MediaSession/MediaSessionBase.d.ts +0 -35
- package/lib/MediaSession/MediaSessionBase.d.ts.map +0 -1
- package/lib/MediaSession/MediaSessionBase.js +0 -155
- package/lib/MediaSession/MediaSessionBase.js.map +0 -1
- package/lib/MediaSession/SessionOpentok.d.ts +0 -52
- package/lib/MediaSession/SessionOpentok.d.ts.map +0 -1
- package/lib/MediaSession/SessionOpentok.js +0 -516
- package/lib/MediaSession/SessionOpentok.js.map +0 -1
- package/lib/MediaSession/SessionTurn.d.ts +0 -38
- package/lib/MediaSession/SessionTurn.d.ts.map +0 -1
- package/lib/MediaSession/SessionTurn.js +0 -637
- package/lib/MediaSession/SessionTurn.js.map +0 -1
- package/lib/MediaSession/TurnConstants.d.ts +0 -19
- package/lib/MediaSession/TurnConstants.d.ts.map +0 -1
- package/lib/MediaSession/TurnConstants.js +0 -34
- package/lib/MediaSession/TurnConstants.js.map +0 -1
- package/lib/MediaSubscriber.d.ts +0 -37
- package/lib/MediaSubscriber.d.ts.map +0 -1
- package/lib/MediaSubscriber.js +0 -303
- package/lib/MediaSubscriber.js.map +0 -1
- package/lib/MediaUtils/Compatibility.d.ts +0 -17
- package/lib/MediaUtils/Compatibility.d.ts.map +0 -1
- package/lib/MediaUtils/Compatibility.js +0 -177
- package/lib/MediaUtils/Compatibility.js.map +0 -1
- package/lib/MediaUtils/MediaDomUtils.d.ts +0 -7
- package/lib/MediaUtils/MediaDomUtils.d.ts.map +0 -1
- package/lib/MediaUtils/MediaDomUtils.js +0 -220
- package/lib/MediaUtils/MediaDomUtils.js.map +0 -1
- package/lib/MediaUtils/MediaTracer.d.ts +0 -4
- package/lib/MediaUtils/MediaTracer.d.ts.map +0 -1
- package/lib/MediaUtils/MediaTracer.js +0 -10
- package/lib/MediaUtils/MediaTracer.js.map +0 -1
- package/lib/MediaUtils/index.d.ts +0 -2
- package/lib/MediaUtils/index.d.ts.map +0 -1
- package/lib/MediaUtils/index.js +0 -6
- package/lib/MediaUtils/index.js.map +0 -1
- package/lib/MultiParty/DetectWebRtcService.d.ts +0 -19
- package/lib/MultiParty/DetectWebRtcService.d.ts.map +0 -1
- package/lib/MultiParty/DetectWebRtcService.js +0 -134
- package/lib/MultiParty/DetectWebRtcService.js.map +0 -1
- package/lib/MultiParty/MediaCapabilitiesService.d.ts +0 -18
- package/lib/MultiParty/MediaCapabilitiesService.d.ts.map +0 -1
- package/lib/MultiParty/MediaCapabilitiesService.js +0 -208
- package/lib/MultiParty/MediaCapabilitiesService.js.map +0 -1
- package/lib/MultiParty/MediaCapabilitiesUtils.d.ts +0 -6
- package/lib/MultiParty/MediaCapabilitiesUtils.d.ts.map +0 -1
- package/lib/MultiParty/MediaCapabilitiesUtils.js +0 -123
- package/lib/MultiParty/MediaCapabilitiesUtils.js.map +0 -1
- package/lib/MultiParty/MediaTracer.d.ts +0 -4
- package/lib/MultiParty/MediaTracer.d.ts.map +0 -1
- package/lib/MultiParty/MediaTracer.js +0 -10
- package/lib/MultiParty/MediaTracer.js.map +0 -1
- package/lib/MultiParty/MultiPartyService.d.ts +0 -49
- package/lib/MultiParty/MultiPartyService.d.ts.map +0 -1
- package/lib/MultiParty/MultiPartyService.js +0 -31
- package/lib/MultiParty/MultiPartyService.js.map +0 -1
- package/lib/MultiParty/MultiPartyServiceFactory.d.ts +0 -4
- package/lib/MultiParty/MultiPartyServiceFactory.d.ts.map +0 -1
- package/lib/MultiParty/MultiPartyServiceFactory.js +0 -13
- package/lib/MultiParty/MultiPartyServiceFactory.js.map +0 -1
- package/lib/MultiParty/MultipartyServiceEventTypes.d.ts +0 -89
- package/lib/MultiParty/MultipartyServiceEventTypes.d.ts.map +0 -1
- package/lib/MultiParty/MultipartyServiceEventTypes.js +0 -16
- package/lib/MultiParty/MultipartyServiceEventTypes.js.map +0 -1
- package/lib/MultiParty/index.d.ts +0 -7
- package/lib/MultiParty/index.d.ts.map +0 -1
- package/lib/MultiParty/index.js +0 -25
- package/lib/MultiParty/index.js.map +0 -1
- package/lib/MultiParty/opentok/OpentokMultiPartyService.d.ts +0 -38
- package/lib/MultiParty/opentok/OpentokMultiPartyService.d.ts.map +0 -1
- package/lib/MultiParty/opentok/OpentokMultiPartyService.js +0 -645
- package/lib/MultiParty/opentok/OpentokMultiPartyService.js.map +0 -1
- package/lib/MultiParty/opentok/OpentokPublisher.d.ts +0 -34
- package/lib/MultiParty/opentok/OpentokPublisher.d.ts.map +0 -1
- package/lib/MultiParty/opentok/OpentokPublisher.js +0 -182
- package/lib/MultiParty/opentok/OpentokPublisher.js.map +0 -1
- package/lib/MultiParty/opentok/OpentokPublisherEventMapper.d.ts +0 -20
- package/lib/MultiParty/opentok/OpentokPublisherEventMapper.d.ts.map +0 -1
- package/lib/MultiParty/opentok/OpentokPublisherEventMapper.js +0 -49
- package/lib/MultiParty/opentok/OpentokPublisherEventMapper.js.map +0 -1
- package/lib/MultiParty/opentok/OpentokScreenPublisher.d.ts +0 -6
- package/lib/MultiParty/opentok/OpentokScreenPublisher.d.ts.map +0 -1
- package/lib/MultiParty/opentok/OpentokScreenPublisher.js +0 -56
- package/lib/MultiParty/opentok/OpentokScreenPublisher.js.map +0 -1
- package/lib/MultiParty/opentok/OpentokSubscriber.d.ts +0 -2
- package/lib/MultiParty/opentok/OpentokSubscriber.d.ts.map +0 -1
- package/lib/MultiParty/opentok/OpentokSubscriber.js +0 -26
- package/lib/MultiParty/opentok/OpentokSubscriber.js.map +0 -1
- package/lib/MultiParty/opentok/OpentokVideoPublisher.d.ts +0 -19
- package/lib/MultiParty/opentok/OpentokVideoPublisher.d.ts.map +0 -1
- package/lib/MultiParty/opentok/OpentokVideoPublisher.js +0 -236
- package/lib/MultiParty/opentok/OpentokVideoPublisher.js.map +0 -1
- package/lib/MultiParty/opentok/trace.d.ts +0 -3
- package/lib/MultiParty/opentok/trace.d.ts.map +0 -1
- package/lib/MultiParty/opentok/trace.js +0 -18
- package/lib/MultiParty/opentok/trace.js.map +0 -1
- package/lib/MultiParty/types.d.ts +0 -32
- package/lib/MultiParty/types.d.ts.map +0 -1
- package/lib/MultiParty/types.js +0 -3
- package/lib/MultiParty/types.js.map +0 -1
- package/lib/MultiParty/utils.d.ts +0 -10
- package/lib/MultiParty/utils.d.ts.map +0 -1
- package/lib/MultiParty/utils.js +0 -17
- package/lib/MultiParty/utils.js.map +0 -1
- package/lib/TechseeMediaStream.d.ts +0 -15
- package/lib/TechseeMediaStream.d.ts.map +0 -1
- package/lib/TechseeMediaStream.js +0 -80
- package/lib/TechseeMediaStream.js.map +0 -1
- package/lib/qos/raw-qos.d.ts +0 -29
- package/lib/qos/raw-qos.d.ts.map +0 -1
- package/lib/qos/raw-qos.js +0 -345
- package/lib/qos/raw-qos.js.map +0 -1
- package/lib/webrtc-ie-shim.d.ts +0 -4
- package/lib/webrtc-ie-shim.d.ts.map +0 -1
- package/lib/webrtc-ie-shim.js +0 -2822
- package/lib/webrtc-ie-shim.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@techsee/techsee-media-service",
|
|
3
|
-
"version": "999.17.
|
|
3
|
+
"version": "999.17.3333-alphasa01",
|
|
4
4
|
"description": "Techsee Media Service",
|
|
5
5
|
"author": "TechSee",
|
|
6
6
|
"license": "ISC",
|
|
7
|
-
"main": "
|
|
7
|
+
"main": "index.js",
|
|
8
8
|
"scripts": {
|
|
9
|
-
"build": "tsc -p ./tsconfig.json",
|
|
9
|
+
"build": "tsc -p ./tsconfig.build.json",
|
|
10
10
|
"copy-dts": "copyfiles -u 1 \"src/**/*.d.ts\" lib",
|
|
11
11
|
"clean": "rimraf lib node_modules",
|
|
12
12
|
"lint": "run-s lint:*",
|
|
13
|
-
"lint:prettier": "prettier --check \"./**/*.{js?(x),ts?(x),json,scss,md}\" --ignore-path
|
|
14
|
-
"lint:eslint": "eslint
|
|
13
|
+
"lint:prettier": "prettier --check \"./**/*.{js?(x),ts?(x),json,scss,md}\" --ignore-path ./.prettierignore",
|
|
14
|
+
"lint:eslint": "eslint src/Live3/**",
|
|
15
15
|
"lint-fix": "run-s lint-fix:*",
|
|
16
|
-
"lint-fix:prettier": "prettier --write \"./**/*.{js?(x),ts?(x),json,scss,md}\" --ignore-path
|
|
17
|
-
"lint-fix:eslint": "eslint --fix --color
|
|
16
|
+
"lint-fix:prettier": "prettier --write \"./**/*.{js?(x),ts?(x),json,scss,md}\" --ignore-path ./.prettierignore",
|
|
17
|
+
"lint-fix:eslint": "eslint --fix --color src/Live3/**",
|
|
18
18
|
"lint-staged": "lint-staged --quiet",
|
|
19
19
|
"sort": "sort-package-json",
|
|
20
|
-
"test": "jest --passWithNoTests --maxWorkers=4",
|
|
20
|
+
"test": "jest --passWithNoTests --color --maxWorkers=4",
|
|
21
21
|
"watch": "run-p watch:*",
|
|
22
22
|
"watch:build": "tsc -p ./tsconfig.build.json --watch",
|
|
23
23
|
"demo": "start-storybook -p 9003 -c .storybook -s ./ && open http://localhost:9003/",
|
|
24
|
-
"demo-build": "build-storybook -c .storybook -o demo-
|
|
24
|
+
"demo-build": "build-storybook -c .storybook -o demo-lib"
|
|
25
25
|
},
|
|
26
26
|
"lint-staged": {
|
|
27
27
|
"./**/*.{js?(x),ts?(x),json,scss,md}": "prettier --write",
|
|
@@ -85,7 +85,8 @@
|
|
|
85
85
|
"socket.io": "~2.2.0",
|
|
86
86
|
"ts-jest": "~29.0.1",
|
|
87
87
|
"ts-loader": "~8.4.0",
|
|
88
|
-
"typescript": "~4.8.3"
|
|
88
|
+
"typescript": "~4.8.3",
|
|
89
|
+
"@opentok/client": "2.23.0"
|
|
89
90
|
},
|
|
90
91
|
"husky": {
|
|
91
92
|
"hooks": {
|
|
@@ -94,6 +95,6 @@
|
|
|
94
95
|
}
|
|
95
96
|
},
|
|
96
97
|
"files": [
|
|
97
|
-
"/
|
|
98
|
+
"/dist/**/*"
|
|
98
99
|
]
|
|
99
100
|
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { ClientWebRtcInfo } from '@techsee/techsee-common/lib/data-contracts/ClientInfo';
|
|
2
|
-
export declare const DETECT_RTC_ADVISED_TIMEOUT = 20000;
|
|
3
|
-
export declare const defaultWebRtcResult: {
|
|
4
|
-
isWebRTCSupported: boolean;
|
|
5
|
-
isWebsiteHasWebcamPermissions: boolean;
|
|
6
|
-
isWebsiteHasMicrophonePermissions: boolean;
|
|
7
|
-
isGetUserMediaSupported: boolean;
|
|
8
|
-
isApplyConstraintsSupported: boolean;
|
|
9
|
-
};
|
|
10
|
-
export declare class DetectWebRtcService {
|
|
11
|
-
private static instance?;
|
|
12
|
-
private static initPromise;
|
|
13
|
-
private cachedResult;
|
|
14
|
-
private constructor();
|
|
15
|
-
static get: () => Promise<DetectWebRtcService>;
|
|
16
|
-
private readonly init;
|
|
17
|
-
getWebRtcInfo: () => ClientWebRtcInfo;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=DetectWebRtcService.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DetectWebRtcService.d.ts","sourceRoot":"","sources":["../../src/Live3/DetectWebRtcService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uDAAuD,CAAC;AAG9F,eAAO,MAAM,0BAA0B,QAAQ,CAAC;AAEhD,eAAO,MAAM,mBAAmB;;;;;;CAM/B,CAAC;AAEF,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAsB;IAC9C,OAAO,CAAC,MAAM,CAAC,WAAW,CAAoC;IAE9D,OAAO,CAAC,YAAY,CAAyC;IAE7D,OAAO;IAEP,OAAc,GAAG,QAAa,QAAQ,mBAAmB,CAAC,CAWxD;IAEF,OAAO,CAAC,QAAQ,CAAC,IAAI,CA0BnB;IAEK,aAAa,QAAO,gBAAgB,CAAsB;CAClE"}
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
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;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
-
};
|
|
41
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
exports.DetectWebRtcService = exports.defaultWebRtcResult = exports.DETECT_RTC_ADVISED_TIMEOUT = void 0;
|
|
43
|
-
var detectrtc_1 = __importDefault(require("detectrtc"));
|
|
44
|
-
exports.DETECT_RTC_ADVISED_TIMEOUT = 20000;
|
|
45
|
-
exports.defaultWebRtcResult = {
|
|
46
|
-
isWebRTCSupported: false,
|
|
47
|
-
isWebsiteHasWebcamPermissions: false,
|
|
48
|
-
isWebsiteHasMicrophonePermissions: false,
|
|
49
|
-
isGetUserMediaSupported: false,
|
|
50
|
-
isApplyConstraintsSupported: false,
|
|
51
|
-
};
|
|
52
|
-
var DetectWebRtcService = /** @class */ (function () {
|
|
53
|
-
function DetectWebRtcService() {
|
|
54
|
-
var _this = this;
|
|
55
|
-
Object.defineProperty(this, "cachedResult", {
|
|
56
|
-
enumerable: true,
|
|
57
|
-
configurable: true,
|
|
58
|
-
writable: true,
|
|
59
|
-
value: exports.defaultWebRtcResult
|
|
60
|
-
});
|
|
61
|
-
Object.defineProperty(this, "init", {
|
|
62
|
-
enumerable: true,
|
|
63
|
-
configurable: true,
|
|
64
|
-
writable: true,
|
|
65
|
-
value: function () { return __awaiter(_this, void 0, void 0, function () {
|
|
66
|
-
var _this = this;
|
|
67
|
-
return __generator(this, function (_b) {
|
|
68
|
-
return [2 /*return*/, new Promise(function (resolve, reject) {
|
|
69
|
-
var timeoutPtr = setTimeout(function () {
|
|
70
|
-
timeoutPtr = null;
|
|
71
|
-
_this.cachedResult = exports.defaultWebRtcResult;
|
|
72
|
-
reject();
|
|
73
|
-
}, exports.DETECT_RTC_ADVISED_TIMEOUT);
|
|
74
|
-
detectrtc_1.default.load(function () {
|
|
75
|
-
if (timeoutPtr === null) {
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
clearTimeout(timeoutPtr);
|
|
79
|
-
_this.cachedResult = {
|
|
80
|
-
isWebRTCSupported: detectrtc_1.default.isWebRTCSupported,
|
|
81
|
-
isWebsiteHasWebcamPermissions: detectrtc_1.default.isWebsiteHasWebcamPermissions,
|
|
82
|
-
isWebsiteHasMicrophonePermissions: detectrtc_1.default.isWebsiteHasMicrophonePermissions,
|
|
83
|
-
isGetUserMediaSupported: detectrtc_1.default.isGetUserMediaSupported,
|
|
84
|
-
isApplyConstraintsSupported: detectrtc_1.default.isApplyConstraintsSupported,
|
|
85
|
-
};
|
|
86
|
-
resolve();
|
|
87
|
-
});
|
|
88
|
-
})];
|
|
89
|
-
});
|
|
90
|
-
}); }
|
|
91
|
-
});
|
|
92
|
-
Object.defineProperty(this, "getWebRtcInfo", {
|
|
93
|
-
enumerable: true,
|
|
94
|
-
configurable: true,
|
|
95
|
-
writable: true,
|
|
96
|
-
value: function () { return _this.cachedResult; }
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
var _a;
|
|
100
|
-
_a = DetectWebRtcService;
|
|
101
|
-
Object.defineProperty(DetectWebRtcService, "initPromise", {
|
|
102
|
-
enumerable: true,
|
|
103
|
-
configurable: true,
|
|
104
|
-
writable: true,
|
|
105
|
-
value: Promise.resolve()
|
|
106
|
-
});
|
|
107
|
-
Object.defineProperty(DetectWebRtcService, "get", {
|
|
108
|
-
enumerable: true,
|
|
109
|
-
configurable: true,
|
|
110
|
-
writable: true,
|
|
111
|
-
value: function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
112
|
-
return __generator(_a, function (_b) {
|
|
113
|
-
switch (_b.label) {
|
|
114
|
-
case 0: return [4 /*yield*/, DetectWebRtcService.initPromise];
|
|
115
|
-
case 1:
|
|
116
|
-
_b.sent();
|
|
117
|
-
if (!!DetectWebRtcService.instance) return [3 /*break*/, 3];
|
|
118
|
-
DetectWebRtcService.instance = new DetectWebRtcService();
|
|
119
|
-
DetectWebRtcService.initPromise = DetectWebRtcService.instance.init();
|
|
120
|
-
return [4 /*yield*/, DetectWebRtcService.initPromise];
|
|
121
|
-
case 2:
|
|
122
|
-
_b.sent();
|
|
123
|
-
_b.label = 3;
|
|
124
|
-
case 3: return [2 /*return*/, DetectWebRtcService.instance];
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
}); }
|
|
128
|
-
});
|
|
129
|
-
return DetectWebRtcService;
|
|
130
|
-
}());
|
|
131
|
-
exports.DetectWebRtcService = DetectWebRtcService;
|
|
132
|
-
//# sourceMappingURL=DetectWebRtcService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DetectWebRtcService.js","sourceRoot":"","sources":["../../src/Live3/DetectWebRtcService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,wDAAkC;AAErB,QAAA,0BAA0B,GAAG,KAAK,CAAC;AAEnC,QAAA,mBAAmB,GAAG;IACjC,iBAAiB,EAAE,KAAK;IACxB,6BAA6B,EAAE,KAAK;IACpC,iCAAiC,EAAE,KAAK;IACxC,uBAAuB,EAAE,KAAK;IAC9B,2BAA2B,EAAE,KAAK;CACnC,CAAC;AAEF;IAME;QAAA,iBAAwB;QAFxB;;;;mBAAyC,2BAAmB;WAAC;QAiB7D;;;;mBAAwB;;;oBACtB,sBAAO,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;4BACjC,IAAI,UAAU,GAA0B,UAAU,CAAC;gCACjD,UAAU,GAAG,IAAI,CAAC;gCAClB,KAAI,CAAC,YAAY,GAAG,2BAAmB,CAAC;gCACxC,MAAM,EAAE,CAAC;4BACX,CAAC,EAAE,kCAA0B,CAAC,CAAC;4BAE/B,mBAAS,CAAC,IAAI,CAAC;gCACb,IAAI,UAAU,KAAK,IAAI,EAAE;oCACvB,OAAO;iCACR;gCAED,YAAY,CAAC,UAAU,CAAC,CAAC;gCAEzB,KAAI,CAAC,YAAY,GAAG;oCAClB,iBAAiB,EAAE,mBAAS,CAAC,iBAAiB;oCAC9C,6BAA6B,EAAE,mBAAS,CAAC,6BAA6B;oCACtE,iCAAiC,EAAE,mBAAS,CAAC,iCAAiC;oCAC9E,uBAAuB,EAAE,mBAAS,CAAC,uBAAuB;oCAC1D,2BAA2B,EAAE,mBAAS,CAAC,2BAA2B;iCACnE,CAAC;gCAEF,OAAO,EAAE,CAAC;4BACZ,CAAC,CAAC,CAAC;wBACL,CAAC,CAAC,EAAC;;iBACJ;WAAC;QAEF;;;;mBAAuB,cAAwB,OAAA,KAAI,CAAC,YAAY,EAAjB,CAAiB;WAAC;IA3C1C,CAAC;;;IAJT;;;;eAA6B,OAAO,CAAC,OAAO,EAAE;OAAC;IAMhD;;;;eAAM;;;4BAClB,qBAAM,mBAAmB,CAAC,WAAW,EAAA;;wBAArC,SAAqC,CAAC;6BAElC,CAAC,mBAAmB,CAAC,QAAQ,EAA7B,wBAA6B;wBAC/B,mBAAmB,CAAC,QAAQ,GAAG,IAAI,mBAAmB,EAAE,CAAC;wBACzD,mBAAmB,CAAC,WAAW,GAAG,mBAAmB,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;wBAEtE,qBAAM,mBAAmB,CAAC,WAAW,EAAA;;wBAArC,SAAqC,CAAC;;4BAGxC,sBAAO,mBAAmB,CAAC,QAAQ,EAAC;;;aACrC;OAAC;IA+BJ,0BAAC;CAAA,AAlDD,IAkDC;AAlDY,kDAAmB"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export declare class MediaCapabilitiesService {
|
|
2
|
-
private static instance?;
|
|
3
|
-
private static initPromise;
|
|
4
|
-
private webRtcSupportInfo;
|
|
5
|
-
private devicesList;
|
|
6
|
-
private readonly environmentService;
|
|
7
|
-
private constructor();
|
|
8
|
-
static getInstance(): Promise<MediaCapabilitiesService>;
|
|
9
|
-
private init;
|
|
10
|
-
hasCamera(): boolean;
|
|
11
|
-
hasMicrophone(): boolean;
|
|
12
|
-
hasWebRTC(): boolean;
|
|
13
|
-
updateDevicesList(reverse?: boolean): Promise<void>;
|
|
14
|
-
get supportSwitchCamera(): boolean;
|
|
15
|
-
get backCameraDeviceId(): string;
|
|
16
|
-
get frontCameraDeviceId(): string;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=MediaCapabilitiesService.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MediaCapabilitiesService.d.ts","sourceRoot":"","sources":["../../src/Live3/MediaCapabilitiesService.ts"],"names":[],"mappings":"AAcA,qBAAa,wBAAwB;IACnC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAA2B;IACnD,OAAO,CAAC,MAAM,CAAC,WAAW,CAAoC;IAE9D,OAAO,CAAC,iBAAiB,CAAyC;IAElE,OAAO,CAAC,WAAW,CAGjB;IAEF,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAA6B;IAEhE,OAAO;WAEa,WAAW,IAAI,OAAO,CAAC,wBAAwB,CAAC;YAatD,IAAI;IAWX,SAAS,IAAI,OAAO;IAIpB,aAAa,IAAI,OAAO;IAOxB,SAAS,IAAI,OAAO;IAId,iBAAiB,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAchE,IAAW,mBAAmB,IAAI,OAAO,CAExC;IAED,IAAW,kBAAkB,IAAI,MAAM,CAEtC;IAED,IAAW,mBAAmB,IAAI,MAAM,CAEvC;CACF"}
|
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
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;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.MediaCapabilitiesService = void 0;
|
|
40
|
-
var ts_environment_detect_1 = require("@techsee/techsee-common/lib/helpers/ts-environment-detect");
|
|
41
|
-
var MediaTracer_1 = require("./MediaTracer");
|
|
42
|
-
var DetectWebRtcService_1 = require("./DetectWebRtcService");
|
|
43
|
-
//TODO not a same service like the client infra
|
|
44
|
-
var trace = (0, MediaTracer_1.getMediaTracer)('MediaCapabilitiesService');
|
|
45
|
-
var MediaCapabilitiesService = /** @class */ (function () {
|
|
46
|
-
function MediaCapabilitiesService() {
|
|
47
|
-
Object.defineProperty(this, "webRtcSupportInfo", {
|
|
48
|
-
enumerable: true,
|
|
49
|
-
configurable: true,
|
|
50
|
-
writable: true,
|
|
51
|
-
value: DetectWebRtcService_1.defaultWebRtcResult
|
|
52
|
-
});
|
|
53
|
-
Object.defineProperty(this, "devicesList", {
|
|
54
|
-
enumerable: true,
|
|
55
|
-
configurable: true,
|
|
56
|
-
writable: true,
|
|
57
|
-
value: {
|
|
58
|
-
video: [],
|
|
59
|
-
audio: [],
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
Object.defineProperty(this, "environmentService", {
|
|
63
|
-
enumerable: true,
|
|
64
|
-
configurable: true,
|
|
65
|
-
writable: true,
|
|
66
|
-
value: new ts_environment_detect_1.TsEnvironmentDetect()
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
Object.defineProperty(MediaCapabilitiesService, "getInstance", {
|
|
70
|
-
enumerable: false,
|
|
71
|
-
configurable: true,
|
|
72
|
-
writable: true,
|
|
73
|
-
value: function () {
|
|
74
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
75
|
-
return __generator(this, function (_a) {
|
|
76
|
-
switch (_a.label) {
|
|
77
|
-
case 0: return [4 /*yield*/, this.initPromise];
|
|
78
|
-
case 1:
|
|
79
|
-
_a.sent();
|
|
80
|
-
if (!!this.instance) return [3 /*break*/, 3];
|
|
81
|
-
this.instance = new MediaCapabilitiesService();
|
|
82
|
-
this.initPromise = this.instance.init();
|
|
83
|
-
return [4 /*yield*/, this.initPromise];
|
|
84
|
-
case 2:
|
|
85
|
-
_a.sent();
|
|
86
|
-
_a.label = 3;
|
|
87
|
-
case 3: return [2 /*return*/, this.instance];
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
Object.defineProperty(MediaCapabilitiesService.prototype, "init", {
|
|
94
|
-
enumerable: false,
|
|
95
|
-
configurable: true,
|
|
96
|
-
writable: true,
|
|
97
|
-
value: function () {
|
|
98
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
99
|
-
var detectWebRtcService;
|
|
100
|
-
return __generator(this, function (_a) {
|
|
101
|
-
switch (_a.label) {
|
|
102
|
-
case 0: return [4 /*yield*/, DetectWebRtcService_1.DetectWebRtcService.get()];
|
|
103
|
-
case 1:
|
|
104
|
-
detectWebRtcService = _a.sent();
|
|
105
|
-
this.webRtcSupportInfo = detectWebRtcService.getWebRtcInfo();
|
|
106
|
-
return [4 /*yield*/, this.updateDevicesList()];
|
|
107
|
-
case 2:
|
|
108
|
-
_a.sent();
|
|
109
|
-
//** @FIXME handle promise */
|
|
110
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
111
|
-
trace.info('initialize media capabilities helper successfully');
|
|
112
|
-
return [2 /*return*/];
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
});
|
|
118
|
-
Object.defineProperty(MediaCapabilitiesService.prototype, "hasCamera", {
|
|
119
|
-
enumerable: false,
|
|
120
|
-
configurable: true,
|
|
121
|
-
writable: true,
|
|
122
|
-
value: function () {
|
|
123
|
-
return this.devicesList.video.length > 0 && this.webRtcSupportInfo.isGetUserMediaSupported;
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
Object.defineProperty(MediaCapabilitiesService.prototype, "hasMicrophone", {
|
|
127
|
-
enumerable: false,
|
|
128
|
-
configurable: true,
|
|
129
|
-
writable: true,
|
|
130
|
-
value: function () {
|
|
131
|
-
var userMediaSupported = this.webRtcSupportInfo.isGetUserMediaSupported;
|
|
132
|
-
return this.environmentService.isIOS()
|
|
133
|
-
? userMediaSupported
|
|
134
|
-
: this.devicesList.audio.length > 0 && userMediaSupported;
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
Object.defineProperty(MediaCapabilitiesService.prototype, "hasWebRTC", {
|
|
138
|
-
enumerable: false,
|
|
139
|
-
configurable: true,
|
|
140
|
-
writable: true,
|
|
141
|
-
value: function () {
|
|
142
|
-
return this.webRtcSupportInfo.isWebRTCSupported;
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
Object.defineProperty(MediaCapabilitiesService.prototype, "updateDevicesList", {
|
|
146
|
-
enumerable: false,
|
|
147
|
-
configurable: true,
|
|
148
|
-
writable: true,
|
|
149
|
-
value: function (reverse) {
|
|
150
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
151
|
-
var localDevicesList, _a;
|
|
152
|
-
return __generator(this, function (_b) {
|
|
153
|
-
switch (_b.label) {
|
|
154
|
-
case 0:
|
|
155
|
-
if (!this.webRtcSupportInfo.isWebRTCSupported) return [3 /*break*/, 2];
|
|
156
|
-
return [4 /*yield*/, navigator.mediaDevices.enumerateDevices()];
|
|
157
|
-
case 1:
|
|
158
|
-
_a = _b.sent();
|
|
159
|
-
return [3 /*break*/, 3];
|
|
160
|
-
case 2:
|
|
161
|
-
_a = [];
|
|
162
|
-
_b.label = 3;
|
|
163
|
-
case 3:
|
|
164
|
-
localDevicesList = _a;
|
|
165
|
-
this.devicesList = {
|
|
166
|
-
video: localDevicesList.filter(function (device) { return device.kind.toLowerCase() === 'videoinput'; }),
|
|
167
|
-
audio: localDevicesList.filter(function (device) { return device.kind.toLowerCase() === 'audioinput'; }),
|
|
168
|
-
};
|
|
169
|
-
if (reverse) {
|
|
170
|
-
this.devicesList.video.reverse();
|
|
171
|
-
}
|
|
172
|
-
return [2 /*return*/];
|
|
173
|
-
}
|
|
174
|
-
});
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
|
-
Object.defineProperty(MediaCapabilitiesService.prototype, "supportSwitchCamera", {
|
|
179
|
-
get: function () {
|
|
180
|
-
return this.devicesList.video.length > 1;
|
|
181
|
-
},
|
|
182
|
-
enumerable: false,
|
|
183
|
-
configurable: true
|
|
184
|
-
});
|
|
185
|
-
Object.defineProperty(MediaCapabilitiesService.prototype, "backCameraDeviceId", {
|
|
186
|
-
get: function () {
|
|
187
|
-
var _a;
|
|
188
|
-
return ((_a = this.devicesList.video[this.devicesList.video.length - 1]) === null || _a === void 0 ? void 0 : _a.deviceId) || '';
|
|
189
|
-
},
|
|
190
|
-
enumerable: false,
|
|
191
|
-
configurable: true
|
|
192
|
-
});
|
|
193
|
-
Object.defineProperty(MediaCapabilitiesService.prototype, "frontCameraDeviceId", {
|
|
194
|
-
get: function () {
|
|
195
|
-
var _a;
|
|
196
|
-
return ((_a = this.devicesList.video[0]) === null || _a === void 0 ? void 0 : _a.deviceId) || '';
|
|
197
|
-
},
|
|
198
|
-
enumerable: false,
|
|
199
|
-
configurable: true
|
|
200
|
-
});
|
|
201
|
-
Object.defineProperty(MediaCapabilitiesService, "initPromise", {
|
|
202
|
-
enumerable: true,
|
|
203
|
-
configurable: true,
|
|
204
|
-
writable: true,
|
|
205
|
-
value: Promise.resolve()
|
|
206
|
-
});
|
|
207
|
-
return MediaCapabilitiesService;
|
|
208
|
-
}());
|
|
209
|
-
exports.MediaCapabilitiesService = MediaCapabilitiesService;
|
|
210
|
-
//# sourceMappingURL=MediaCapabilitiesService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MediaCapabilitiesService.js","sourceRoot":"","sources":["../../src/Live3/MediaCapabilitiesService.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const checkIsMobile: () => boolean;
|
|
2
|
-
export declare const checkWebRtc: () => Promise<boolean>;
|
|
3
|
-
export declare function checkVideoCapabilities(): Promise<boolean>;
|
|
4
|
-
export declare function checkAudioCapabilities(): Promise<boolean>;
|
|
5
|
-
export declare function checkSupportSwitchCamera(): Promise<boolean>;
|
|
6
|
-
//# sourceMappingURL=MediaCapabilitiesUtils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MediaCapabilitiesUtils.d.ts","sourceRoot":"","sources":["../../src/Live3/MediaCapabilitiesUtils.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,aAAa,QAAO,OAIhC,CAAC;AAEF,eAAO,MAAM,WAAW,QAAa,QAAQ,OAAO,CAYnD,CAAC;AAEF,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,OAAO,CAAC,CAY/D;AAED,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,OAAO,CAAC,CAY/D;AAED,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,OAAO,CAAC,CAYjE"}
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
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;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.checkSupportSwitchCamera = exports.checkAudioCapabilities = exports.checkVideoCapabilities = exports.checkWebRtc = exports.checkIsMobile = void 0;
|
|
40
|
-
var ts_environment_detect_1 = require("@techsee/techsee-common/lib/helpers/ts-environment-detect");
|
|
41
|
-
var MediaTracer_1 = require("./MediaTracer");
|
|
42
|
-
var MediaCapabilitiesService_1 = require("./MediaCapabilitiesService");
|
|
43
|
-
var trace = (0, MediaTracer_1.getMediaTracer)('MediaCapabilitiesUtils');
|
|
44
|
-
var checkIsMobile = function () {
|
|
45
|
-
var environmentService = new ts_environment_detect_1.TsEnvironmentDetect();
|
|
46
|
-
return environmentService.isMobile();
|
|
47
|
-
};
|
|
48
|
-
exports.checkIsMobile = checkIsMobile;
|
|
49
|
-
var checkWebRtc = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
50
|
-
var mediaCapabilitiesService, hasWebRTC, err_1;
|
|
51
|
-
return __generator(this, function (_a) {
|
|
52
|
-
switch (_a.label) {
|
|
53
|
-
case 0:
|
|
54
|
-
_a.trys.push([0, 2, , 3]);
|
|
55
|
-
return [4 /*yield*/, MediaCapabilitiesService_1.MediaCapabilitiesService.getInstance()];
|
|
56
|
-
case 1:
|
|
57
|
-
mediaCapabilitiesService = _a.sent();
|
|
58
|
-
hasWebRTC = mediaCapabilitiesService.hasWebRTC();
|
|
59
|
-
return [2 /*return*/, hasWebRTC];
|
|
60
|
-
case 2:
|
|
61
|
-
err_1 = _a.sent();
|
|
62
|
-
//** @FIXME handle promise */
|
|
63
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
64
|
-
trace.error(JSON.stringify(err_1));
|
|
65
|
-
return [3 /*break*/, 3];
|
|
66
|
-
case 3: return [2 /*return*/, false];
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
}); };
|
|
70
|
-
exports.checkWebRtc = checkWebRtc;
|
|
71
|
-
function checkVideoCapabilities() {
|
|
72
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
73
|
-
var mediaCapabilitiesService, hasCamera, err_2;
|
|
74
|
-
return __generator(this, function (_a) {
|
|
75
|
-
switch (_a.label) {
|
|
76
|
-
case 0:
|
|
77
|
-
_a.trys.push([0, 2, , 3]);
|
|
78
|
-
return [4 /*yield*/, MediaCapabilitiesService_1.MediaCapabilitiesService.getInstance()];
|
|
79
|
-
case 1:
|
|
80
|
-
mediaCapabilitiesService = _a.sent();
|
|
81
|
-
hasCamera = mediaCapabilitiesService.hasCamera();
|
|
82
|
-
return [2 /*return*/, hasCamera];
|
|
83
|
-
case 2:
|
|
84
|
-
err_2 = _a.sent();
|
|
85
|
-
//** @FIXME handle promise */
|
|
86
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
87
|
-
trace.error(JSON.stringify(err_2));
|
|
88
|
-
return [3 /*break*/, 3];
|
|
89
|
-
case 3: return [2 /*return*/, false];
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
exports.checkVideoCapabilities = checkVideoCapabilities;
|
|
95
|
-
function checkAudioCapabilities() {
|
|
96
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
97
|
-
var mediaCapabilitiesService, hasMicrophone, err_3;
|
|
98
|
-
return __generator(this, function (_a) {
|
|
99
|
-
switch (_a.label) {
|
|
100
|
-
case 0:
|
|
101
|
-
_a.trys.push([0, 2, , 3]);
|
|
102
|
-
return [4 /*yield*/, MediaCapabilitiesService_1.MediaCapabilitiesService.getInstance()];
|
|
103
|
-
case 1:
|
|
104
|
-
mediaCapabilitiesService = _a.sent();
|
|
105
|
-
hasMicrophone = mediaCapabilitiesService.hasMicrophone();
|
|
106
|
-
return [2 /*return*/, hasMicrophone];
|
|
107
|
-
case 2:
|
|
108
|
-
err_3 = _a.sent();
|
|
109
|
-
//** @FIXME handle promise */
|
|
110
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
111
|
-
trace.error(JSON.stringify(err_3));
|
|
112
|
-
return [3 /*break*/, 3];
|
|
113
|
-
case 3: return [2 /*return*/, false];
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
exports.checkAudioCapabilities = checkAudioCapabilities;
|
|
119
|
-
function checkSupportSwitchCamera() {
|
|
120
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
121
|
-
var mediaCapabilitiesService, supportSwitchCamera, err_4;
|
|
122
|
-
return __generator(this, function (_a) {
|
|
123
|
-
switch (_a.label) {
|
|
124
|
-
case 0:
|
|
125
|
-
_a.trys.push([0, 2, , 3]);
|
|
126
|
-
return [4 /*yield*/, MediaCapabilitiesService_1.MediaCapabilitiesService.getInstance()];
|
|
127
|
-
case 1:
|
|
128
|
-
mediaCapabilitiesService = _a.sent();
|
|
129
|
-
supportSwitchCamera = mediaCapabilitiesService.supportSwitchCamera;
|
|
130
|
-
return [2 /*return*/, supportSwitchCamera];
|
|
131
|
-
case 2:
|
|
132
|
-
err_4 = _a.sent();
|
|
133
|
-
//** @FIXME handle promise */
|
|
134
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
135
|
-
trace.error(JSON.stringify(err_4));
|
|
136
|
-
return [3 /*break*/, 3];
|
|
137
|
-
case 3: return [2 /*return*/, false];
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
exports.checkSupportSwitchCamera = checkSupportSwitchCamera;
|
|
143
|
-
//# sourceMappingURL=MediaCapabilitiesUtils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MediaCapabilitiesUtils.js","sourceRoot":"","sources":["../../src/Live3/MediaCapabilitiesUtils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mGAAgG;AAChG,6CAA+C;AAC/C,uEAAsE;AAEtE,IAAM,KAAK,GAAG,IAAA,4BAAc,EAAC,wBAAwB,CAAC,CAAC;AAEhD,IAAM,aAAa,GAAG;IAC3B,IAAM,kBAAkB,GAAG,IAAI,2CAAmB,EAAE,CAAC;IAErD,OAAO,kBAAkB,CAAC,QAAQ,EAAE,CAAC;AACvC,CAAC,CAAC;AAJW,QAAA,aAAa,iBAIxB;AAEK,IAAM,WAAW,GAAG;;;;;;gBAEU,qBAAM,mDAAwB,CAAC,WAAW,EAAE,EAAA;;gBAAvE,wBAAwB,GAAG,SAA4C;gBACvE,SAAS,GAAG,wBAAwB,CAAC,SAAS,EAAE,CAAC;gBACvD,sBAAO,SAAS,EAAC;;;gBAEjB,6BAA6B;gBAC7B,mEAAmE;gBACnE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAG,CAAC,CAAC,CAAC;;oBAGnC,sBAAO,KAAK,EAAC;;;KACd,CAAC;AAZW,QAAA,WAAW,eAYtB;AAEF,SAAsB,sBAAsB;;;;;;;oBAEP,qBAAM,mDAAwB,CAAC,WAAW,EAAE,EAAA;;oBAAvE,wBAAwB,GAAG,SAA4C;oBACvE,SAAS,GAAG,wBAAwB,CAAC,SAAS,EAAE,CAAC;oBACvD,sBAAO,SAAS,EAAC;;;oBAEjB,6BAA6B;oBAC7B,mEAAmE;oBACnE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAG,CAAC,CAAC,CAAC;;wBAGnC,sBAAO,KAAK,EAAC;;;;CACd;AAZD,wDAYC;AAED,SAAsB,sBAAsB;;;;;;;oBAEP,qBAAM,mDAAwB,CAAC,WAAW,EAAE,EAAA;;oBAAvE,wBAAwB,GAAG,SAA4C;oBACvE,aAAa,GAAG,wBAAwB,CAAC,aAAa,EAAE,CAAC;oBAC/D,sBAAO,aAAa,EAAC;;;oBAErB,6BAA6B;oBAC7B,mEAAmE;oBACnE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAG,CAAC,CAAC,CAAC;;wBAGnC,sBAAO,KAAK,EAAC;;;;CACd;AAZD,wDAYC;AAED,SAAsB,wBAAwB;;;;;;;oBAET,qBAAM,mDAAwB,CAAC,WAAW,EAAE,EAAA;;oBAAvE,wBAAwB,GAAG,SAA4C;oBACvE,mBAAmB,GAAG,wBAAwB,CAAC,mBAAmB,CAAC;oBACzE,sBAAO,mBAAmB,EAAC;;;oBAE3B,6BAA6B;oBAC7B,mEAAmE;oBACnE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAG,CAAC,CAAC,CAAC;;wBAGnC,sBAAO,KAAK,EAAC;;;;CACd;AAZD,4DAYC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MediaTracer.d.ts","sourceRoot":"","sources":["../../src/Live3/MediaTracer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAG9E,eAAO,MAAM,oBAAoB,gBAAgB,CAAC;AAElD,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,cAAc,CAElE"}
|
package/lib/Live3/MediaTracer.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getMediaTracer = exports.TECHSEE_MEDIA_TRACER = void 0;
|
|
4
|
-
var Tracer_1 = require("@techsee/techsee-common/lib/core/Tracer");
|
|
5
|
-
exports.TECHSEE_MEDIA_TRACER = 'MediaTracer';
|
|
6
|
-
function getMediaTracer(postfixName) {
|
|
7
|
-
return (0, Tracer_1.getTracer)(exports.TECHSEE_MEDIA_TRACER, postfixName);
|
|
8
|
-
}
|
|
9
|
-
exports.getMediaTracer = getMediaTracer;
|
|
10
|
-
//# sourceMappingURL=MediaTracer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MediaTracer.js","sourceRoot":"","sources":["../../src/Live3/MediaTracer.ts"],"names":[],"mappings":";;;AACA,kEAAoE;AAEvD,QAAA,oBAAoB,GAAG,aAAa,CAAC;AAElD,SAAgB,cAAc,CAAC,WAAmB;IAChD,OAAO,IAAA,kBAAS,EAAC,4BAAoB,EAAE,WAAW,CAAC,CAAC;AACtD,CAAC;AAFD,wCAEC"}
|