-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathindex.js
42 lines (42 loc) · 1.84 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import checkPeerConnection from "./checks/peerConnection";
import checkMediaCapture from "./checks/mediaCapture";
import checkInternetSpeed from "./checks/internet";
import countDevies from "./checks/count_devices";
import checkFeatureSupport from "./checks/feature_support";
import checkRelayPerformance from "./checks/turnPerformace";
// Utils
import flat from "./utils/simplify_promise";
import * as dom from "./utils/dom_tag_tools";
import getUserMedia from "./utils/user_media";
import * as mediaStream from "./utils/media_stream_tools";
import createRTCPeerConnection from "./utils/peerconn";
// Utils function
const checkPeerConnectionSilent=function(rtcConfig = {}, verbose = false, timeout = 30000){return flat(checkPeerConnection(rtcConfig, verbose, timeout))};
const checkMediaCaptureSilent=function(constraints, verbose = false, getStream = false, timeout = 60000){return flat(checkMediaCapture(constraints, verbose, getStream, timeout))};
const checkInternetSpeedSilent=function(checkerFile, verbose = false){return flat(checkInternetSpeed(checkerFile, verbose))};
const countDeviesSilent=function(verbose = false){return flat(countDevies(verbose))};
const getUserMediaSilent=function(constraints, verbose = false){return flat(getUserMedia(constraints, verbose))};
const checkRelayPerformanceSilent=function(rtcConfig, verbose = false, timeout = 30000){return flat(checkRelayPerformance(rtcConfig, verbose, timeout))};
const utils = {
flat,
dom,
stream: mediaStream
}
// Exports
export {
checkPeerConnection,
checkMediaCapture,
checkRelayPerformance,
checkInternetSpeed,
countDevies,
getUserMedia,
checkFeatureSupport,
checkPeerConnectionSilent,
checkMediaCaptureSilent,
checkRelayPerformanceSilent,
checkInternetSpeedSilent,
countDeviesSilent,
getUserMediaSilent,
createRTCPeerConnection,
utils
}