-
-
Notifications
You must be signed in to change notification settings - Fork 552
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
base: master
Are you sure you want to change the base?
Add playback speed button for quick acess #2674
Conversation
-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.
Hi and thank you!! @trib2014956
|
hi! @trib2014956 you can let us know your plan from here. |
*Wishfully* "assigning" old legends! |
There was a problem hiding this 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.
No description provided.