Search code examples
reactjswowza

current duration of a live video stream with React hls player in r


I'm using ReactHLS player and that streams a live video. I need to get the current duration of the video and I need to display the same on some other places on the same pages. How can we do it efficiently?


Solution

  • You can use the durationchange event it must support that https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video https://www.npmjs.com/package/react-hls