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

Option to disable video preview when hovering mouse over thumbnail #1785

Closed
lothar-cell opened this issue Oct 9, 2023 · 2 comments · Fixed by #2007
Closed

Option to disable video preview when hovering mouse over thumbnail #1785

lothar-cell opened this issue Oct 9, 2023 · 2 comments · Fixed by #2007
Assignees
Labels
bounty Will pass on donations (Optional) - (OR: Requester will pay personally. Only if stated!) Feature request Wish or idea good first issue A GitHub standard for inviting (new) contributors *Congratulations in advance!* 🧩Plan ready Solution or some specification noted; To-Do; steps for implementation (+raw brainstorming too maybe) up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥

Comments

@lothar-cell
Copy link

PROBLEM: video thumbnails autoplay on mouse hover.

SOLUTION: thumbnails were static.

ALTERNATIVES: -

RELEVANCE / SCOPE: I'm surprised I did not find this option or a request for it, as I think it's essential.

"SIDE EFFECTS":

CONTEXT:
//
Thank you!

SHORT Table (Summary)
Problem thumbnails play preview on mouse hovering
Solution static thumbnails
Alternatives -
Scope essential
Side effects -
Context -
@lothar-cell lothar-cell added Feature request Wish or idea good first issue A GitHub standard for inviting (new) contributors *Congratulations in advance!* help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥ labels Oct 9, 2023
@lothar-cell lothar-cell changed the title Option to disable video preview when hovering mouse on thumbnail Option to disable video preview when hovering mouse over thumbnail Oct 9, 2023
@D-Rekk
Copy link
Contributor

D-Rekk commented Oct 21, 2023

I tried and here's my take:

  • For the homepage: each video has an eventListener of Event("mouseenter"), which will enable the video preview popup. Due to my old experiences, I know that without the original code there could be no way to intercept the Event Listeners (maybe security purposes idk). Only Chrome offers a way to get the eventListeners with getEventListeners(node), but it's only enabled in the ConsoleAPI for debug purposes 🥲.
    After a bit of research though, I found that the Homepage preview player is located in another part of the DOM tree. So what can be done is to remove the element with document.querySelector("#video-preview").remove() with set/clearInterval 🫳🎤.
  • For the recommended videos: the same process doesn't happen. The "preview player" is created dynamically on hover and is linked to each video. There would be little to no benefits in removing the player with a lot of JS Observers since the network requests are still being made in the background; the performance will be inferior to normal behavior.

Honestly, I would not bother to implement the feature for the latter, since in recommended videos the preview is really a preview, a gif-like thumbnail that is pretty light.

For the Homepage this feature would be so great, suited for users who hate the player-in-thumbnail preview.

@D-Rekk D-Rekk added 🧩Plan ready Solution or some specification noted; To-Do; steps for implementation (+raw brainstorming too maybe) and removed help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) labels Oct 21, 2023
@D-Rekk D-Rekk self-assigned this Oct 21, 2023
@D-Rekk
Copy link
Contributor

D-Rekk commented Oct 21, 2023

One extra note: when using the YouTube mini-player, hovering on Homepage videos will not make them play in a thumbnail-sized Player, but they'll play as recommended video preview (basically GIF). Just saying 😶‍🌫️

@ImprovedTube ImprovedTube added the bounty Will pass on donations (Optional) - (OR: Requester will pay personally. Only if stated!) label Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty Will pass on donations (Optional) - (OR: Requester will pay personally. Only if stated!) Feature request Wish or idea good first issue A GitHub standard for inviting (new) contributors *Congratulations in advance!* 🧩Plan ready Solution or some specification noted; To-Do; steps for implementation (+raw brainstorming too maybe) up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants
@lothar-cell @ImprovedTube @D-Rekk and others