npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

react-bit-player

v1.0.7

Published

A React video player component with prebuilt UI and subtitle support.

Readme


🔗 Live Demo

Check out the live demo here: Coming soon

See the player in action and explore its features in a real-world setup!

Usage

npm install react-bit-player
import React from 'react';
import ReactBitPlayer from 'react-bit-player';

const  App  = () => {
const  playerRef  =  useRef<HTMLVideoElement  |  null>(null)

return (
	<div style={{ width:  '50vw', height:  '40vh' }}>
		<ReactBitPlayer 
			src='https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel.ism/.m3u8' 
			ref={playerRef} 
		/>
	</div>
)};
export  default  App;

Props

Since this is wrapped around ReactPlayer, you have access to all ReactPlayer props along with few exclusive to ReactBitPlayer

ReactBitPlayer Exclusive Props

Prop | Description | Default ---- | ----------- | ------- subtitles | An array of subtitles tracks of type Subtitle (see type section) | [] seekBarColor | Color for played section of seekbar. Loaded color also derives from here. Accepts Css color notation. | cyan volumeBarColor | Color for volume bar. | yellow playbackRates | An array of all playback rates available. | [ '0.5', '0.75', '1.0', '1.25', '1.5', '2.0' ] ref | A ref to internal video element of type RefObject<HTMLVideoElement | null>. See example usage above. | null

Subtitle type

Subtitle prop should be an array of type

lang: "string",
url: "string"

Also only vtt type is supported for now.

const captions = [
	{lang: "English", url: "https://path-to-english-subtitle.vtt"},
	{lang: "Spanish", url: "https://path-to-spanish-subtitle.vtt"},
]

<ReactBitPlayer src="xyz.m3u8" subtitles={captions}/>

ReactPlayer Props (Copied from ReactPlayer docs)

Prop | Description | Default ---- | ----------- | ------- src | The url of a video or song to play | undefined playing | Set to true or false to play or pause the media | undefined preload | Applies the preload attribute where supported | undefined playsInline | Applies the playsInline attribute where supported | false crossOrigin | Applies the crossOrigin attribute where supported | undefined loop | Set to true or false to loop the media | false volume | Set the volume of the player, between 0 and 1  ◦  null uses default volume on all players #357 | null muted | Mutes the player | false playbackRate | Set the playback rate of the player  ◦  Only supported by YouTube, Wistia, and file paths | 1 width | Set the width of the player | 320px height | Set the height of the player | 180px style | Add inline styles to the root element | {} light | Set to true to show just the video thumbnail, which loads the full player on click  ◦  Pass in an image URL to override the preview image | false fallback | Element or component to use as a fallback if you are using lazy loading | null wrapper | Element or component to use as the container element | null playIcon | Element or component to use as the play icon in light mode previewTabIndex | Set the tab index to be used on light mode | 0

Callback props

Callback props take a function that gets fired on various player events:

Prop | Description ---- | ----------- onClickPreview | Called when user clicks the light mode preview onReady | Called when media is loaded and ready to play. If playing is set to true, media will play immediately onStart | Called when media starts playing onPlay | Called when the playing prop is set to true onPlaying | Called when media actually starts playing onProgress | Called when media data is loaded onTimeUpdate | Called when the media's current time changes onDurationChange | Callback containing duration of the media, in seconds onPause | Called when media is paused onWaiting | Called when media is buffering and waiting for more data onSeeking | Called when media is seeking onSeeked | Called when media has finished seeking onRateChange | Called when playback rate of the player changed  ◦  Only supported by YouTube, Vimeo (if enabled), Wistia, and file paths onEnded | Called when media finishes playing  ◦  Does not fire when loop is set to true onError | Called when an error occurs whilst attempting to play media onEnterPictureInPicture | Called when entering picture-in-picture mode onLeavePictureInPicture | Called when leaving picture-in-picture mode

Config prop

There is a single config prop to override settings for each type of player:

<ReactPlayer
  src={src}
  config={{
    youtube: {
      color: 'white',
    },
  }}
/>

Settings for each player live under different keys:

Key | Options --- | ------- youtube | https://developers.google.com/youtube/player_parameters#Parameters vimeo | https://developer.vimeo.com/player/sdk/embed hls | https://github.com/video-dev/hls.js/blob/master/docs/API.md#fine-tuning

Supported media

🤝 Contributing

Contributions are welcome!
If you'd like to improve this project, feel free to fork the repo, make your changes, and open a pull request.

For major changes, please open an issue first to discuss what you'd like to change.

Let's build better together! 🚀 Contribute here

Contributors ✨