-
-
Notifications
You must be signed in to change notification settings - Fork 551
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
Update player.js ClipboardItem (supported in the latest firefox too) #2373
Conversation
only works in chrome? did you go back to FF from Vivaldi? 🤫 |
I use multiple Chrome based browsers (Brave/Vivaldi). Installed FF because it looked like nobody was testing if things work there :) FF testing is super annoying, no way of installing unpacked extension permanently :(
details in comment #2341 (comment) |
ok looks like Safari does support it https://webkit.org/blog/10855/ no idea why its wrapped in setTimeout
also the screenshot icon could use a visual feedback, an CSS transition/animation/brief color change in activation also navigator.clipboard.write is a promise and will inform us when it fails, for example in Chrome we need explicit focus, otherwise it silently fails. Listening for return with
gives us
if user happens to click Screenshot icon/trigger shortcut and immediately alt-tabs to another application to paste clipboard. cvs.toBlob is quite slow as it has to encode fullhd png, so probably >100ms before we copy to clipboard, plenty of time for alt tabbing. window.focus(); fixes that. This might be one of those rare situations where throwing explicit Alert at a user makes sense. |
used to move / twitch! - didnt come alone that code yet though. |
icon or whole player window? :) I can imagine whole player window glitching due to old code injecting that weird CCS for a split second.
where clicking extension buttons in/under player flashes color for a second. --yt-spec-call-to-action (link color) works in every theme. |
workaround for #2341 by removing clipboard option from Firefox, saving to file works fine