cms icon indicating copy to clipboard operation
cms copied to clipboard

feature: Autoplay the next video after completion of one #1308

Open SahilLamba0008 opened this issue 1 year ago • 8 comments

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

SahilLamba0008 avatar Oct 05 '24 12:10 SahilLamba0008

Adding it to things to reivew

devsargam avatar Oct 08 '24 21:10 devsargam

Mean while if u can clear the conflicts @

devsargam avatar Oct 08 '24 21:10 devsargam

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 avatar Oct 09 '24 03:10 SahilLamba0008

@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 avatar Oct 09 '24 09:10 Prashant-flick

@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!

Screenshot 2024-10-09 at 3 53 46 PM

SahilLamba0008 avatar Oct 09 '24 10:10 SahilLamba0008

@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!

Screenshot 2024-10-09 at 3 53 46 PM

@devsargam should I create a issue for this and implement it ?

SahilLamba0008 avatar Oct 11 '24 08:10 SahilLamba0008

@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

devsargam avatar Oct 11 '24 08:10 devsargam

@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.

SahilLamba0008 avatar Oct 11 '24 09:10 SahilLamba0008

Also, as a follow up pr. Would you be interested to add next button in the video player itself

devsargam avatar Oct 25 '24 06:10 devsargam

Also, as a follow up pr. Would you be interested to add next button in the video player itself

Sure, will Raise a new PR by tomorrow EOD.

SahilLamba0008 avatar Oct 25 '24 06:10 SahilLamba0008

Also, as a follow up pr. Would you be interested to add next button 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 video type.

https://github.com/user-attachments/assets/b676ffae-f4fb-470b-83f4-ac446abfb42b

SahilLamba0008 avatar Oct 25 '24 15:10 SahilLamba0008

Also, as a follow up pr. Would you be interested to add next button 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 video type.

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.

SahilLamba0008 avatar Oct 26 '24 05:10 SahilLamba0008

@devsargam Is this okay or do I've to raise a new issue for this.

SahilLamba0008 avatar Oct 30 '24 16:10 SahilLamba0008

@devsargam Please review, I guess it's good now.

SahilLamba0008 avatar Oct 31 '24 12:10 SahilLamba0008

@devsargam Any updates on the review ?

SahilLamba0008 avatar Nov 03 '24 12:11 SahilLamba0008

hi @devsargam, should i open a new issue for this pr ?

SahilLamba0008 avatar Nov 07 '24 13:11 SahilLamba0008

Let me review this one sir. Further more I will inform. I had to take a break so currently getting everything in line

devsargam avatar Nov 07 '24 15:11 devsargam

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.

SahilLamba0008 avatar Nov 07 '24 15:11 SahilLamba0008

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.

SahilLamba0008 avatar Nov 16 '24 18:11 SahilLamba0008

I will review it today if possible thanks for waiting

devsargam avatar Nov 17 '24 03:11 devsargam

image

devsargam avatar Nov 17 '24 07:11 devsargam

Works good on dev but breaks during the build might want to fix it @SahilLamba0008

devsargam avatar Nov 17 '24 07:11 devsargam

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.

SahilLamba0008 avatar Nov 17 '24 10:11 SahilLamba0008

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

devsargam avatar Nov 17 '24 13:11 devsargam

@SahilLamba0008 can you resolve them by today?

devsargam avatar Nov 17 '24 13:11 devsargam

@SahilLamba0008 can you resolve them by today?

Yeah, already done. Will raise a PR when I reach home, probably by tonight.

SahilLamba0008 avatar Nov 17 '24 13:11 SahilLamba0008

@devsargam All set, bro. I've run the build command locally as well, just to be sure.

SahilLamba0008 avatar Nov 17 '24 15:11 SahilLamba0008

@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 ?

SahilLamba0008 avatar Nov 28 '24 18:11 SahilLamba0008

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

devsargam avatar Nov 29 '24 16:11 devsargam

@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

devsargam avatar Dec 06 '24 13:12 devsargam