1.1.8 • Published 2 years ago
@ztxtxwd/react-ts-flv-player v1.1.8
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