devcshort / react-hls

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

Get Current Position of Pre-Recorded Video #14

Closed mstahlmann closed 3 years ago

mstahlmann commented 3 years ago

My site is encoding pre-recorded video assets in hls format. I need to get the current position of the video playback to set a bookmark. There doesn't seem to be a way to do this.

mstahlmann commented 3 years ago

const onProgressHandler = (i) =>{ console.log("Time Value I was looking for-->>",i.nativeEvent.target.currentTime) }

found the solution thought I would answer it in case someone else was looking for it.