1.0.4 ⢠Published 4 years ago
internet-status v1.0.4
internet-status
A lightweight utility that finds out and outputs internet connection status on a browser
Install
npm install --save internet-statusUsage
import React from "react";
import InternetStatus from "internet-status";
const App = () =>{
<InternetStatus
pingIntervalInSeconds="15",
idealInternetSpeed="5", // Mbps
slowInternetSpeed="1", // Mbps
// Default image values
testImageUrl = "https://res.cloudinary.com/dnsuxxqz1/image/upload/app/OE8Ie4TRdJgqyUGHCu8TDnzYIQH5TEoX.jpg",
testImageSizeInBytes = "98715" />;
}| Prop | Options |
|---|---|
| pingIntervalInSeconds | Ping interval in seconds / how often do you wanna check Status |
| idealInternetSpeed | What is the ideal internet speed (Any speed above ideal is a š¢ ) |
| slowInternetSpeed | What is the slow internet speed (Any speed above slow is š ) |
| testImageUrl | Url of a image preferably on your server, this will be used to check the speed |
| testImageSizeInBytes | Size of the test image |
Output
š¢ If internet connection is ideal
š If internet connection is slow
š“ If internet connection is less than slow or offlineLicense
MIT Ā© Srivatsa-Rao