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

It stops my videos when im in the home page #2305

Open
beCe3-veqnor opened this issue May 24, 2024 · 5 comments
Open

It stops my videos when im in the home page #2305

beCe3-veqnor opened this issue May 24, 2024 · 5 comments
Labels
Bug Bug or required update after YouTube changes Completion / Revision Rethink, complete, improve, tweak our feature or structure. 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! ♥

Comments

@beCe3-veqnor
Copy link

1. Bug Report:

  • BUG: when i select the option to just reproduce one video, it pauses the video im watching if i hover the mouse in another video on the home screen
    • Browser: opera GX
    • HOW: No, its simple
  • Did YouTube change? No
    • Im new here, just installed
@beCe3-veqnor beCe3-veqnor added Bug Bug or required update after YouTube changes 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 May 24, 2024
@raszpl
Copy link
Contributor

raszpl commented May 25, 2024

hovering over video triggers creation of video preview, extension somehow assumes its a real video playing.

@ImprovedTube
Copy link
Member

hi! @beCe3-veqnor sounds like you are you using the feature
player:auto-pause while i'm not in the tab
or pause while i play a 2nd video

@ImprovedTube ImprovedTube added the Completion / Revision Rethink, complete, improve, tweak our feature or structure. label May 26, 2024
@ImprovedTube
Copy link
Member

#2225

@ImprovedTube
Copy link
Member

real video

can actually navigate the whole video in those previews, if we mean the same thing

@raszpl
Copy link
Contributor

raszpl commented Jun 16, 2024

both autoplayDisable() and

extension.features.onlyOnePlayerInstancePlaying = function () {
if (extension.storage.get('only_one_player_instance_playing') === true) {
var videos = document.querySelectorAll('video');
for (var i = 0, l = videos.length; i < l; i++) {
videos[i].pause();
}
}
};

dont even try to detect video previews

place where fix should go is autoplayDisable()

} else {
document.dispatchEvent(new CustomEvent('it-play'));
}
} else {
document.dispatchEvent(new CustomEvent('it-play'));

only send it-play message when real video is playing, ignoring video previews.
even earlier in
ImprovedTube.playerOnPlay = function () {
HTMLMediaElement.prototype.play = (function (original) {
return function () {
this.removeEventListener('loadedmetadata', ImprovedTube.playerOnLoadedMetadata);
this.addEventListener('loadedmetadata', ImprovedTube.playerOnLoadedMetadata);

detect if video preview and skip straight to
return original.apply(this, arguments);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug or required update after YouTube changes Completion / Revision Rethink, complete, improve, tweak our feature or structure. 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! ♥
Projects
None yet
Development

No branches or pull requests

3 participants