@ztxtxwd/react-ts-flv-player
TypeScript icon, indicating that this package has built-in type declarations

1.1.8 • Public • Published

npm package

React TS FLV Player

A React component to play flv streaming video also support typescript.

yarn add @ztxtxwd/react-ts-flv-player

Usage

import { Fragment } from "react";
import { ReactFlvPlayer } from "@ztxtxwd/react-ts-flv-player";
const LiveDashboardPage = () => {
  const url = "https://xxx.flv";
  return (
    <Fragment>
      <ReactFlvPlayer
        url={url}
        isMuted={false}
        isLive={true}
        showControls={true}
        enableStashBuffer={true}
      />
    </Fragment>
  );
};

export default LiveDashboardPage;

Use with NextJS with SSR disable

// create wrapper components 
import dynamic from "next/dynamic";
export const FlvNextPlayer = dynamic(
  () => import("@ztxtxwd/react-ts-flv-player/dist/NextReactFlvPlayer"),
  {
    ssr: false,
  }
);

License

MIT

Package Sidebar

Install

npm i @ztxtxwd/react-ts-flv-player

Weekly Downloads

1

Version

1.1.8

License

MIT

Unpacked Size

9.03 kB

Total Files

12

Last publish

Collaborators

  • ztxtxwd