Giter Club home page Giter Club logo

Comments (19)

deanoemcke avatar deanoemcke commented on July 21, 2024 1

Finally! This has now been implemented 👯

from thegreatsuspender.

deanoemcke avatar deanoemcke commented on July 21, 2024 1

Available in the chrome webstore in v6.30

from thegreatsuspender.

mohanraj-r avatar mohanraj-r commented on July 21, 2024

This might become easier as chrome might be getting a related feature and hopefully API in the near future:

Google Chrome Getting Audio Indicators for Tabs Making Sound

from thegreatsuspender.

deanoemcke avatar deanoemcke commented on July 21, 2024

I think I might leave this one for now. Adding these sites to the whitelist should be a fairly decent workaround for now.

from thegreatsuspender.

deanoemcke avatar deanoemcke commented on July 21, 2024

The latest webstore version now has the ability to 'temporarily pause suspension' for a site. If you have a tab open that is playing music and you do not want it to suspend, you can use this option to prevent it from suspending in the background.
I will not be doing any work in future to try and automatically detect tabs that are producing audio.

from thegreatsuspender.

deanoemcke avatar deanoemcke commented on July 21, 2024

Just to reiterate as this is one of the more commonly requested features. Chrome does not provide developer access to its ability to detect which tab is playing music. Therefore I am unable to include an option to prevent these tabs from suspending.
As an alternative, I have implemented an option in the popup call 'dont suspend for now' which will prevent the current tab from suspending automatically in the background. This can be used to prevent tabs that are playing audio from suspending.
Another alternative is to whitelist the url of the site if you'd like it to always remain unsuspended.

from thegreatsuspender.

dbkaplun avatar dbkaplun commented on July 21, 2024

Would you consider reopening this ticket if Chrome were to provide the ability to easily detect which tabs were playing audio? Maybe if you got a pull request?

from thegreatsuspender.

deanoemcke avatar deanoemcke commented on July 21, 2024

Definitely. I would love to have a dedicated option 'dont suspend tabs that are playing audio'.

from thegreatsuspender.

kirb avatar kirb commented on July 21, 2024

The content script could look for audio/video tags and check !element.paused. There could also be a catch-all setting for Flash/Silverlight as a hack (could still attempt to call !element.paused since the site might be using something like MediaElement.js). If anyone's insane enough to use Java for playback, it appears there's a Java API to detect that too. I don't think it's worth supporting the JS audio API because this is typically used for notification sounds/game sound effects.

It's not a perfect way to do it but considering many major sites are using <audio>/<video> now it might be an acceptable compromise.

Worth also looking at the MuteTab extension's FAQ.

Willing to put in the work for this if you'd like it.

from thegreatsuspender.

deanoemcke avatar deanoemcke commented on July 21, 2024

@kirb i have checked out mutetab, and it left me with the impression that there's just too much hackery involved in getting this feature working. i could definitely do as you suggested and catch a large percentage of the use-cases, but i'm worried that it would appear to be a buggy feature as it would not work consistently.
You're welcome to have a crack at it, and if it seems to work fairly reliably then i'd consider including it.

from thegreatsuspender.

dbkaplun avatar dbkaplun commented on July 21, 2024

I think it would be acceptable if there was a "Do not suspend tabs that have audio or video" checkbox that simply checked if the page had any <audio> or <video> tags.

from thegreatsuspender.

maxxyme avatar maxxyme commented on July 21, 2024

I use theses websites to play music: SoundCloud, Mixcloud and YouTube.

from thegreatsuspender.

DanAtkinson avatar DanAtkinson commented on July 21, 2024

Requires a development of the tabs extensions to allow this. For more information, see here for the Chromium issue.

from thegreatsuspender.

edmundo096 avatar edmundo096 commented on July 21, 2024

I would like to see this soon. Its a great extension that deserves this.
Maybe add an "experimental-noted checkbox" which only checks for HTML5 <audio><video> tags, using what @kirb suggested (on his comment on Jun 5).

from thegreatsuspender.

deanoemcke avatar deanoemcke commented on July 21, 2024

If i was to implement this (highly considering it), what websites specifically should I be targetting? It seems that the audio/video !paused should be fairly easy. but with some quick tests this won't work for soundcloud or spotify. Any broad strokes I can make to detect flash audio/video? What about soundcloud? And are there other popular sites that I should be testing for?

from thegreatsuspender.

maxxyme avatar maxxyme commented on July 21, 2024

In addition to the 3 aforementioned websites, I would add:
Beatport.com (you can listen for free music there; the shop has moved to pro.beatport.com)
Hearthis.at
Hypem.com
Official.fm

from thegreatsuspender.

DanAtkinson avatar DanAtkinson commented on July 21, 2024

The audible tab functionality has now been baked into Chrome 46. Specifically, you should be able to query tab.audible to return a boolean value of whether the tab has produced sound in the last couple of seconds.

More info on the API: https://developer.chrome.com/extensions/tabs

from thegreatsuspender.

infusion avatar infusion commented on July 21, 2024

When is it planned to push out this feature?

from thegreatsuspender.

ForsakenHarmony avatar ForsakenHarmony commented on July 21, 2024

Well now?

from thegreatsuspender.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.