polywock / globalSpeed

Web extension to set a default speed for video and audio
https://chrome.google.com/webstore/detail/global-speed-youtube-netf/jpbjcnkcffbooppibceonlgknpkniiff?hl=en
1.48k stars 170 forks source link

Does the gain control automatically capture audio? #482

Closed Unimp0rtance closed 3 months ago

Unimp0rtance commented 3 months ago

Hi, First of all I'd like to say a special thank you for your work your extension is a must have for my browser, I really appreciate it!


The issue:

I set up the extension to control: speed, pin tabs, and gain adjustments. Speed control works very well

But the gain adjustments If I don't click on the extension or use the shortcut to activate the extension it doesn't work, and that's something every tab needs to do.

so, Please let me know if there are any settings that would save me the trouble of activating the extension every time or is this a feature that could be enhanced? For example, audio capture can be automatically enabled every time the gain control is triggered.

Best Regards

polywock commented 3 months ago

Hello. Glad you find Global Speed helpful.

The Tab Capture API, which Global Speed uses to manipulate audio, requires the user invoke the extension for every tab. That's why it only works when you click the extension, or use a browser-level shortcut. Also won't work with a simple page shortcut.

Most convenient workaround is to set up a Capture shortcut key in options page and use it to activate for each tab.

Unimp0rtance commented 3 months ago

Thank you for your reply!

Indeed, I have set up a shortcut to capture or activate the extension. This is actually acceptable to me.

However, I previously used extensions like VolumeManager which allowed me to control the volume of different pages directly through shortcuts. This led me to have this question wondering if Global Speed could also achieve this. If it can, this would be a huge help.


This plugin is not just helpful; it can change how musicians learn and listen to audio, analyzing at different speeds. Therefore, please allow me to express my sincere gratitude to you again!

Best Wishes!

polywock commented 3 months ago

@Unimp0rtance Thanks! That means a lot.

There is an approach that doesn't require invocation, which is probably what VolumeManager is doing. They capture the audio directly from the video element or audio element. I have tried approach before, but gave up on it due to CORS issues on some sites. On 95% of websites, it worked great, but the other 5% had CORS issues. For that reason, I gravitated towards the Tab Capture API which has no issues on any site, but requires manual activation.

Thanks again!