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

Better solution for hiding the PIP button for the audio formats #3174

Merged
merged 2 commits into from
Feb 10, 2023

Conversation

absidue
Copy link
Member

@absidue absidue commented Feb 8, 2023

Better solution for hiding the PIP button for the audio formats

Pull Request Type

  • Other - Improve existing feature

Related issue

originally implemented in #2227

Description

Since the original pull request I've learnt a lot more about FreeTube's code and have found out that the ft-player component is destroyed and recreated when the formats are changed, so I've now changed the implementation so video.js doesn't even add the PIP button to the player if the audio formats are selected.

This gets rid of a setInterval call which was based on an arbitrary timeout, yay :)

Testing

Watch a video and change the formats.

Desktop

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

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Feb 8, 2023
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) February 8, 2023 16:33
@ChunkyProgrammer
Copy link
Member

The more timeouts and intervals we remove from our code, the better 🙂

Copy link
Collaborator

@PikachuEXE PikachuEXE left a comment

Choose a reason for hiding this comment

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

image

Co-authored-by: PikachuEXE <pikachuexe@gmail.com>
@FreeTubeBot FreeTubeBot merged commit 4c65982 into FreeTubeApp:development Feb 10, 2023
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Feb 10, 2023
@absidue absidue deleted the better-pip-hiding branch February 10, 2023 17:43
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.

5 participants