feature: Autoplay the next video after completion of one #1308
PR Fixes:
- 1 Autoplay Next Video: Implemented functionality to autoplay the next video after one completes.
- 2 Minor Code Cleanup: Refactored some code related to the video player to ensure smooth transitions between videos.
Resolves #[Issue Number if there]
- Resolves #1308
https://github.com/user-attachments/assets/0b164fba-28c2-4986-b59f-a41f9afeb9d2
Checklist before requesting a review
- [ ✅ ] I have performed a self-review of my code
- [ ✅ ] I assure there is no similar/duplicate pull request regarding same issue
Adding it to things to reivew
Mean while if u can clear the conflicts @
Mean while if u can clear the conflicts @
I've resolved the conflicts in the PR, Please review and let me know if there are any other changes needed.
@SahilLamba0008 I think this will only work in the week in which the video is playing , it will not play the next week video, when you are at the last video of a week, can you fix that
@Prashant-flick @devsargam Thank you for the feedback! While I understand the request to have videos automatically continue into the next week's module, I believe this approach may unnecessarily increase the load, especially since not all users may be ready to proceed to the next week's content right away.
Instead, I propose implementing a modal at the end of the last video in the current week's module, similar to YouTube's playlist behavior. This modal could prompt users with an option like "Continue to next week's videos" (refer to image for more context), giving them control over when they want to move forward. This would provide a smoother user experience and reduce potential server or client load by avoiding preloading content until the user chooses to proceed.
Let me know if this sounds like a good compromise!
@Prashant-flick @devsargam Thank you for the feedback! While I understand the request to have videos automatically continue into the next week's module, I believe this approach may unnecessarily increase the load, especially since not all users may be ready to proceed to the next week's content right away.
Instead, I propose implementing a modal at the end of the last video in the current week's module, similar to YouTube's playlist behavior. This modal could prompt users with an option like "Continue to next week's videos" (refer to image for more context), giving them control over when they want to move forward. This would provide a smoother user experience and reduce potential server or client load by avoiding preloading content until the user chooses to proceed.
Let me know if this sounds like a good compromise!
![]()
@devsargam should I create a issue for this and implement it ?
@SahilLamba0008 whatever you are thinking is somewhat correct but I would need a bit more context Can you share a loom https://www.loom.com/ with your explanation
@SahilLamba0008 whatever you are thinking is somewhat correct but I would need a bit more context Can you share a loom https://www.loom.com/ with your explanation
check this out ( https://www.loom.com/share/5be7066dc3ac4d81b1b1a7f7df72b7ae?sid=401e93af-557b-4e43-8c6c-1defd395dc84 ). I'm suggesting to add a modal just like udemy does, suggesting next weeks content on completion of the last video of current week. This modal can have text as Up Next and Next Weeks Module Name with a play button.
Also, as a follow up pr. Would you be interested to add next button in the video player itself
Also, as a follow up pr. Would you be interested to add
nextbutton in the video player itself
Sure, will Raise a new PR by tomorrow EOD.
Also, as a follow up pr. Would you be interested to add
nextbutton in the video player itself
@devsargam can you please check if these are the intended changes.
- I've made changes keeping in mind so that user can only navigate through contents of
videotype.
https://github.com/user-attachments/assets/b676ffae-f4fb-470b-83f4-ac446abfb42b
Also, as a follow up pr. Would you be interested to add
nextbutton in the video player itself@devsargam can you please check if these are the intended changes.
- I've made changes keeping in mind so that user can only navigate through contents of
videotype.Screen.Recording.2024-10-25.at.8.26.17.PM.1.mp4
@devsargam changes are made in this commit "Added navigation buttons within videojs controller with autoplay feature" please review.
@devsargam Is this okay or do I've to raise a new issue for this.
@devsargam Please review, I guess it's good now.
@devsargam Any updates on the review ?
hi @devsargam, should i open a new issue for this pr ?
Let me review this one sir. Further more I will inform. I had to take a break so currently getting everything in line
Let me review this one sir. Further more I will inform. I had to take a break so currently getting everything in line
Apologies sir! Please take your time. I didn't mean to rush you.
Hi @devsargam, I've resolved the latest conflicts. Still waiting for your review—please take a look whenever you're free. I'm up for any further tweaks required.
I will review it today if possible thanks for waiting
Works good on dev but breaks during the build might want to fix it @SahilLamba0008
Works good on dev but breaks during the build might want to fix it @SahilLamba0008
@devsargam I assume the feature is working as expected—please confirm. I'll address the build error ASAP.
Feature works yeah for a week it does but not after that which is fine. You did add the buttons so that should help us implement later on easily so yeah good work
@SahilLamba0008 can you resolve them by today?
@SahilLamba0008 can you resolve them by today?
Yeah, already done. Will raise a PR when I reach home, probably by tonight.
@devsargam All set, bro. I've run the build command locally as well, just to be sure.
@devsargam It's been 2 weeks since you approved the changes, could you let me know how long it might take to get it merged, or if I need to resolve any conflicts on my end ?
nothing is wrong. there are important stuff to look at atm that's what holding it back. if you are curious vidoes not playing with the new appx support
@SahilLamba0008 deprioritizing this seems a bit flaky imho. You did a great job but there are a lot of conflicts and this might cause issues on prod. closing. Sorry for wasting your time but feel free to pick any other issues