Added connection info

This commit is contained in:
Eduard Urbach 2017-11-17 14:17:40 +01:00
parent bb2e1dcbb9
commit ac1eb96489

View File

@ -14,6 +14,19 @@ export class Analytics {
system: {
cpuCount: navigator.hardwareConcurrency,
platform: navigator.platform
},
connection: {
downLink: 0,
roundTripTime: 0,
effectiveType: ""
}
}
if("connection" in navigator) {
analytics.connection = {
downLink: navigator["connection"].downlink,
roundTripTime: navigator["connection"].rtt,
effectiveType: navigator["connection"].effectiveType
}
}