UNPKG

react-hls-video-player

Version:

A simple and easy to use react component for playing an hls live stream

16 lines (15 loc) 480 B
import React, { RefObject } from 'react'; import Hls, { HlsConfig } from 'hls.js'; declare global { interface Window { Hls: typeof Hls; } } export interface ReactHlsPlayerProps extends React.VideoHTMLAttributes<HTMLVideoElement> { hlsConfig?: Partial<HlsConfig>; playerRef?: RefObject<HTMLVideoElement>; getHLSInstance?: (hls: Hls) => void; src: string; } declare const ReactHlsPlayer: React.FC<ReactHlsPlayerProps>; export default ReactHlsPlayer;