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

Fix blocking error when navigating away from an age-restricted video #5343

Merged
merged 3 commits into from
Jul 4, 2024

Conversation

absidue
Copy link
Member

@absidue absidue commented Jun 26, 2024

Fix blocking error when navigating away from an age-restricted video

Pull Request Type

  • Bugfix

Related issue

closes #5319

Description

handleRouteChange assumes there is always a player available, which causes problems when you try to navigate away from an age-restricted video with Show family friendly content only enabled, as we don't create a player in that situation. That caused an error to get thrown, which in turn meant that the next function was not getting called in the beforeRouteLeave hook, making it impossible to navigate away from the watch page.

Testing

  1. Turn on Show family friendly content only in the parental controls settings
  2. Open an age-restricted video (e.g. one from here: https://www.youtube.com/playlist?list=PLSSgDEhQJbsLBwXECx1gisvaB8M2wtY9b)
  3. Make sure the age-restricted message is shown
  4. Try navigating away from the watch page e.g. back button or by clicking one of the navigation buttons on the side bar
  5. The navigation should work.

Desktop

  • OS: Windows
  • OS Version: 10
  • FreeTube version: 0.21.0

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Jun 26, 2024
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) June 26, 2024 19:29
@PikachuEXE
Copy link
Collaborator

Got more errors when visiting a video
image

@absidue
Copy link
Member Author

absidue commented Jun 29, 2024

Fixed the watch history and playlist code too now.

Copy link
Collaborator

@kommunarr kommunarr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (pre-existing, non-blocking): With autoplay enabled on an age-restricted video, the Next Video countdown appears, but don't seem to actually do anything upon completion.

src/renderer/views/Watch/Watch.js Outdated Show resolved Hide resolved
@FreeTubeBot FreeTubeBot merged commit ed39608 into FreeTubeApp:development Jul 4, 2024
5 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Jul 4, 2024
@absidue absidue deleted the age-restricted-error branch July 4, 2024 05:32
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.

[Bug]: Watching other videos is impossible when Age-restriction-videos are encountered
6 participants