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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@hosseintaromi/react-player

v0.1.65

Published

Easily play any type of video by customizing the appearance

Downloads

1

Readme

Video Player · GitHub license npm version NPM Downloads stars - video_player

A video player like YouTube that allows streaming and complete customization This package lets you play videos in different formats such as m3u8, mp4, or any other form. As you noticed, this package allows you to stream; we used HLS. In terms of appearance, we tried to be entirely similar to YouTube because it is standard and popular, but you will not be limited in any way. You can customize all sections individually.

Key Features

  • Ability to stream video or play simple video
  • The default appearance is quite similar to YouTube, but you can fully customize it in the simplest way
  • All facilities are ready for you, such as control of subtitles, dubbing, playback speed and quality by default, and access to control all of these in your application.

Table of Content

 ·  Install  ·  Usage  ·  Contributing  ·  License  ·  Credits  ·  Author  ·  License

Install

Install with npm:

$ npm i @hosseintaromi/video_player

Install with yarn:

$ yarn add @hosseintaromi/video_player

Usage

import { VideoPlayer } from "@hosseintaromi/video_player";

const App = () => {
  //you can control everything with this ref
  const controllerRef = useRef<ControllerRefType>({
    changeSpeed: () => {},
    play: () => {},
  });

  // you can create components for
  // right and left sections on
  // the top of the player
  const right = () => <p>hello</p>;
  const left = () => <p>bye</p>;

  // you can do something when user play the video
  const onPlay = () => {
    console.log("onplay");
  };
  // you can pass custom theme to player
  const theme = {
    colors: {
      primary: "yellow",
      videoBg: "#000",
    },
  };

  return (
    <>
      <VideoPlayer
        src="https://videoUrl.m3u8"
        controls={false}
        loop={true}
        muted={false}
        controllerRef={controllerRef}
        topRightContainer={right()}
        topLeftContainer={left()}
        onPlay={onPlay}
        customTheme={theme}
        poster="http://posterUrl.jpg"
      />
      <button
        onClick={() => {
          controllerRef.current.changeSpeed(4);
        }}
      >
        speed X 4
      </button>
    </>
  );
};

export default App;

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Credits

This software uses the following open source packages:

 ·  React  ·  Node.js  ·  hls.js  ·  emotion

Author

 ·  github/HosseinTaromi

 ·  linkedin/HosseinTaromi

License

Copyright © 2023, Hossein Taromi. Released under the Apache License.