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

Add playback speed button for quick acess #2674

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

trib2014956
Copy link

No description provided.

-Function Definition: The createPlaybackSpeedButtons function creates buttons for different playback speeds (0.5x, 1.0x, 1.5x, and 2.0x).
-Button Creation: For each speed, a button is created with an appropriate label and style.
-Event Listener: Each button has an event listener that calls the ImprovedTube.playbackSpeed function with the corresponding speed when clicked. The current speed is also displayed next to the buttons.
-Appending to Player Controls: The buttons are appended to the player controls, allowing users to easily access them.
Initialization: The init function is modified to call createPlaybackSpeedButtons, ensuring that the buttons are created when the player is initialized.
@ImprovedTube ImprovedTube marked this pull request as draft November 15, 2024 05:26
@ImprovedTube
Copy link
Member

Hi and thank you!! @trib2014956

@ImprovedTube
Copy link
Member

hi! @trib2014956 you can let us know your plan from here.

@ImprovedTube
Copy link
Member

*Wishfully* "assigning" old legends!
Wondering whats best to do in these specific moments.

Copy link
Member

@ARed99 ARed99 left a comment

Choose a reason for hiding this comment

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

The code is functional and implements the playback speed buttons effectively.
It dynamically creates buttons and integrates them into the player's controls, which is a good approach.

However, I suggest improving robustness by ensuring the currentSpeed element exists before updating it and handling cases where .ytp-right-controls might not be available when the function runs.

Additionally, consider making the speed values configurable for greater flexibility. Overall, it's a solid implementation with room for minor refinements.

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.

3 participants