Skip to content

Commit

Permalink
Update VideoPlayer2.tsx
Browse files Browse the repository at this point in the history
Tracks the current video index using the currentVideoIndex state variable.
Accepts a list of videos as input (videoList) and uses currentVideoIndex to determine the current video.
When a video ends, it checks whether there is a next video. If there is, it automatically plays the next video using handleVideoEnded.
Adds a button that appears when there is a next video in the list. When clicked, it advances to the next video in the list.
  • Loading branch information
Aryam2121 authored Apr 12, 2024
1 parent 7b2ff0d commit 96d9ea2
Showing 1 changed file with 72 additions and 274 deletions.
Loading

0 comments on commit 96d9ea2

Please sign in to comment.