UNPKG

@100mslive/hms-video-store

Version:

@100mslive Core SDK which abstracts the complexities of webRTC while providing a reactive store for data management with a unidirectional data flow

20 lines (17 loc) 482 B
// @ts-nocheck import { isBrowser } from './support'; export const getNetworkInfo = () => { if (!isBrowser || typeof navigator.connection === 'undefined') { return; } const connection = navigator.connection; const networkInfo = { downlink: connection.downlink, downlinkMax: connection.downlinkMax, effectiveType: connection.effectiveType, rtt: connection.rtt, saveData: connection.saveData, type: connection.type, }; return networkInfo; };