New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-quix-loader

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-quix-loader

A component to reduce the load of media on the website

latest
Source
npmnpm
Version
0.9.3
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

React QuiX Loader

Reduce the load of a website. If a media is already downloaded by another user, it will be downloader with webtorrent tech, so no load or GB consumed on the server machine. This will grant to the host that the website can be used by infinite people without bandwidth problem.

There is another way to improve this system (A wiki with all detail can be requested in the issue)

Prop Types

Props to pass to the UI component

PropertyTypeRequired?Description
srcStringtrueLike in an image component, the source of the file
infoHashStringtrueAn id to generate from https://instant.io
loadingComponentComponentfalseA component waiting to find the torrent on p2p network
maxTimeoutNumberfalseDefault 15000, it's the time that wait before load the content from the server instead of torrent network

Examples

Here is an example of the use of the component with the UI

import {QuiXImg, QuiXVideo} from 'react-quix-loader';
import img1 from './asset/img1.jpg'
import videoSmall from './asset/video_small.mp4'

import img2 from './asset/img2.jpg'
import videoBig from './asset/video_big.mp4'

function App() {

    return (
        <div style={{display:"flex", flexDirection:"column"}}>
            Small image:
            <QuiXImg style={{height: "200px", objectFit:"contain"}} src={img1} infoHash={"befa0472c1d9fc266f0448f7b35076b4b29835c7"}/>
            Big image:
            <QuiXImg style={{height: "200px", objectFit:"contain"}} src={img2} infoHash={"b34630aa434af7a664d3a186b8fca7ce31734f09"}/>
            Small video:
            <QuiXVideo style={{height: "400px"}} src={videoSmall}
                       infoHash={"a8e5c780be600d02bac85a551bc8ed6626334dbf"}/>
            Big video:
            <QuiXVideo style={{height: "400px"}} src={videoBig}
                       infoHash={"cb9405f084dd224919f1399a425315c7a63211b9"}/>
        </div>
    );
}

export default App;

Keywords

torrent

FAQs

Package last updated on 30 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts