@ztxtxwd/react-ts-flv-player
v1.1.8
Published
A React Component to play flv video also support Typescript
Downloads
6
Maintainers
Readme
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