youtube icon indicating copy to clipboard operation
youtube copied to clipboard

Shifting video player on x2 speed shortcut

Open 0x0017 opened this issue 1 year ago • 2 comments

Required: Appearance → Comments Sidebar ✔

Bug: When using standard shortcuts for x2 speed, be it “hold space” or “hold LMB on player”, the player window shifts to the upper right corner. The bug is not present when using “Shift + <” and “Shift + >” to change playback speed. Persist on both private and default modes. Resolution: 1920x1080 Browser: Firefox 125.0.2 | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) OS: Windows 10

improvedtube.json

https://github.com/code-charity/youtube/assets/100290901/454947b1-e8a6-4116-9894-fe520dfe2ac1

0x0017 avatar May 01 '24 10:05 0x0017

thanks! @0x0017 (this must be another report with a solution in mind.)
(hi! @D-Rekk (only if you like))

ImprovedTube avatar May 02 '24 12:05 ImprovedTube

eeeew this stupid layout happens in here https://github.com/code-charity/youtube/blob/e1c339d6b994d8824779f9cd55ca096d42838ec9/js%26css/web-accessible/www.youtube.com/appearance.js#L236-L239

as soon as I saw setTimeouts I knew it is broken :)

raszpl avatar Jun 29 '24 05:06 raszpl

hi @raszpl! The feature was much appreciated and written before youtube's "hold space for x2 speed" was released https://github.com/code-charity/youtube/pull/1697.

Limiting the scope of a features gives peace of mind if(ImprovedTube.storage.comments_sidebar === true){ feature }
resizePlayer could be limited too some way like if ( !user_interacted ) { ... } yet instead of true we could define it event.key or say if (last_input != " ") and so on https://github.com/code-charity/youtube/pull/2431#issuecomment-2207351827 (and remove avoid many event listeners #1634) yet more specifically video.offset width seems to be 0 for that a moment so video.offset != 0

A well timed resizePlayer() function was going to fix our player size:max-width too, yet maybe that's not necessary anymore? /youtube-changed back?

ImprovedTube avatar Jul 17 '24 06:07 ImprovedTube

(fixed) hi! @0x0017

ImprovedTube avatar Jul 28 '24 20:07 ImprovedTube