devcshort / react-hls

Simple React component for playing hls/rtmp live streams.
https://www.npmjs.com/package/react-hls-player
MIT License
120 stars 48 forks source link

TypeScript error - "playerRef" is required prop #32

Open Imagery-na opened 3 years ago

Imagery-na commented 3 years ago

I am getting the error Property playerRef is missing on type '{src: string; autoPlay: true; controls: true; width: string;} 'but is required in type' HlsPlayerProps'. Can you please make this props an optional parameter, as it is in the examples?

markwny commented 2 years ago

I found that as well. I modified index.d.ts to make playerRef optional. After some time I ended up using directly hls.js instead.

cgilly2fast commented 2 months ago

This issue was fixed but unfortunately introduced a bug where it redefined the ref every render.

I maintain a fork with this fox, among other bug fixes here: https://github.com/cgilly2fast/react-hls