streamkeys icon indicating copy to clipboard operation
streamkeys copied to clipboard

Commands are sent to all open YouTube players when configured not to

Open ConorJS opened this issue 2 years ago • 13 comments

Regardless of whether 'General' -> 'General Settings' -> 'Send commands to most recent player tab only.' is set or not, all YouTube players across all Chrome windows pause/unpause when I hit the play/pause hotkey. This has worked for years, and randomly broke a few days ago.

Chrome version: 97.0.4692.71 (Official Build) (64-bit)

It's possible I was running 96.0.4664 until I restarted Chrome, and then started noticing the issue. I hadn't restarted Chrome for a while until recently, so it could be the newer version causing this.

ConorJS avatar Jan 17 '22 12:01 ConorJS

I have the exact same problem. I'm on Opera 83.0.4254.19 (64bit) and it stopped working the same day as ConorJS. Likewise, I also updated my version before the problem occurred. I can also replicate the problem in Chrome 97.0.4692.99 (Offizieller Build) (64-Bit). Any help would be appreciated.

Timums avatar Jan 22 '22 10:01 Timums

After a bit of digging, it looks like tabStates[tab.id].state.isPlaying at https://github.com/berrberr/streamkeys/blob/master/code/js/background.js#L91 always returns true for youtube videos. Digging DEEPER it's because of https://github.com/berrberr/streamkeys/blob/master/code/js/controllers/YoutubeController.js#L14 as area-label never changes when you play/pause a video. In my testing changing it to check title seems to have fixed this issue, as it updates with the change of player state. https://github.com/berrberr/streamkeys/pull/851 is my proposed fix.

ZornTaov avatar Jan 27 '22 05:01 ZornTaov

This issue has been annoying the hell out of me. I depend on Streamkeys to help me handle my debilitating tab hoarding problem and it's been failing since this problem cropped up 😄

Hopefully a maintainer merges this in and they push out a new version to the Chrome store - until then, does anyone know if there is an easy way we could fix this ourselves? Not sure how simple it is to build your own altered version of the extension and install it to Chrome etc 🙈

Staindk avatar Feb 17 '22 10:02 Staindk

when will this be merged/fixed lol

lollilol avatar Mar 19 '22 13:03 lollilol

@Staindk I'm a bit late but it's not too too hard if you have git and node installed, by running these in a terminal:

git clone [email protected]:berrberr/streamkeys.git
cd streamkeys
git fetch origin pull/851/head:youtube-fix
git checkout youtube-fix
npm install
npm run grunt:dev

then on the chrome extensions page (chrome://extensions/) you can use "Load unpacked" with the folder streamkeys/build/unpacked-dev (don't forget to also disable the other streamkeys extension while you have this temporary one active)

I would love to see it merged and published to the actual extension though

BaliBalo avatar Mar 20 '22 14:03 BaliBalo

@BaliBalo And I'm even later - but just wanted to mention your instructions worked perfectly and I'm back to play/pausing youtube properly ^_^

Thanks!

Staindk avatar Jun 15 '22 18:06 Staindk

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Oct 30 '22 09:10 stale[bot]

Bump - AFAIK this is still a problem and should not be closed.

Staindk avatar Oct 30 '22 09:10 Staindk

@berrberr

NimmLor avatar Nov 07 '22 11:11 NimmLor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 03 '23 05:04 stale[bot]

It looks like the fix for this may have been merged in #851? If so, I would be grateful if a release with this fix could be pushed to the Chrome Web Store.

runer112 avatar Apr 04 '23 02:04 runer112

Would be great if this was pushed :D

MonzterDev avatar Jun 20 '23 14:06 MonzterDev

This is really annoying as I can't even build the project as @BaliBalo detailed anymore, due to some npm dependency being broken or something. Really unfortunate cuz this extension has been essential for me

Btw the error, after running npm run grunt:dev is:

>> Error: Can't walk dependency graph: Cannot find module 'URIjs' from '/home/jdnixx/Downloads/streamkeys/node_modules/urlutils/index.js'
>>     required by /home/jdnixx/Downloads/streamkeys/node_modules/urlutils/index.js
Warning: Error running grunt-browserify. Use --force to continue.

jdnixx avatar Jun 27 '23 01:06 jdnixx