Skip to content

Commit

Permalink
chore: fix the useEffect and update the version to 7.0.16
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharma, Amit committed Aug 4, 2022
1 parent ed4ca9d commit 2d92b57
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions example/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-video-player-extended",
"version": "7.0.15",
"version": "7.0.16",
"description": "React HTML5 video providing functionality for marking and selecting frames, jumping back and forth between frames based on the fps.",
"author": "Amitt K Sharma",
"license": "MIT",
Expand Down
5 changes: 2 additions & 3 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -230,16 +230,15 @@ function VideoPlayer(props: Props) {
}

useEffect(() => {
console.log(`Some changes to use effect`)
const instance = playerEl.current
instance.addEventListener('timeupdate', handleProgress)
instance.addEventListener('durationchange', handleDurationLoaded)
playerEl.current.addEventListener('timeupdate', handleProgress)
playerEl.current.addEventListener('durationchange', handleDurationLoaded)
if (timeStart) {
seekToPlayer()
}
if (isPlaying) {
playerEl.current.play()
instance.play()
}

return () => {
Expand Down

0 comments on commit 2d92b57

Please sign in to comment.