Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#67] Make first video play manual #76

Merged
merged 3 commits into from
Dec 6, 2024

Conversation

mauriciofierrom
Copy link
Owner

Closes #67.

Ask the user to play YouTube videos manually every 3 hours (hardcoded for now) to make plays count towards video views.

- Add a canPlay method to player interface
- Add canPlay implementations for Dummy and Youtube players
- Add Youtube playing restriction to have played manually any video per
  user every three hours
- Add a canLoop method to loop manager to use the canPlay method and
  make sure to return the promises every step of the chain so we can
  handle when the canPlay promise is rejected
- Update the loading of videos to not automatically play them. This is
  used on Lesson creation and works fine because cue-ing the video
  fetches the duration, which was a requirement on Lesson creation and
  thus simplifies enforcing the restriction on load. Playing will always
  come from manual play in this case.
@mauriciofierrom mauriciofierrom merged commit aed2c93 into main Dec 6, 2024
2 checks passed
@mauriciofierrom mauriciofierrom deleted the 67-make-first-video-play-manual branch December 6, 2024 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make first video play manual
1 participant