ferdium / ferdium-app

All your services in one place, built by the community
https://ferdium.org
Apache License 2.0
2.92k stars 176 forks source link

Bug: Audio icon displaying when receiving messages while Audio is disabled for service. #674

Open cino opened 2 years ago

cino commented 2 years ago

Avoid duplicates

Ferdium Version

6.2.1-nightly.19

What Operating System are you using?

macOS

Operating System Version

MacOS Monterey 12.4 (21F79)

What arch are you using?

arm64 (including Apple Silicon)

Last Known Working Ferdium version

v6.2.1-nightly.8

Expected Behavior

The audio icon should not be displayed when receiving notifications and/or the audio is disabled for mentioned service.

Actual Behavior

Every time I get a WhatsApp message I'll see the audio icon below the service icon while the audio is disabled.

Steps to reproduce

  1. Disable audio for a service
  2. Play audio in the service
  3. Audio icon will display even though there is no sound coming from the service

OR

  1. Disable audio for messaging service
  2. Wait for a message to come in and see the audio icon for a short while

Debug link

No response

Screenshots

No response

Additional information

This is since #655 got merged, I believe it should be as easy as checking if the service's audio is enabled.

santhosh-chinnasamy commented 2 years ago

@cino I used media-started-playing event listener to indicate us when a media is played. Even if we disabled audio according to the event listener it received that particular event. I'll check how to hide the icon when receiving notifications.

I thought of the following scenario , we disabled the audio for a service but a video is being played in that service at this time we don't know something is consuming bandwidth right !

a solution for this might be using different icon for this get our attention to that service when audio is disabled. What do you think ?

cino commented 2 years ago

@santhosh-chinnasamy I think we should find a way to differentiate a video playing from receiving a notification (That's what keeps showing the audio icon for me). We could change the behavior only to show the audio icon after let's say 2 seconds after media-started-playing. (Which means keeping some form of a state there).

In that case, we can rule out that it is a notification and still ensure we are consuming bandwidth.

Next to that, we might wanna change this into a preference setting if you'd like to have this icon displayed when playing sound. What do you think @vraravam?

MusicMaikel commented 2 years ago

@cino It seems like this function triggers on "active" GIFs too. Every time I switch to a server in the Discord service and a GIF is playing, it displays the speaker icon. Even though there is no sound in GIFs. I think the best solution would be to have the icon displaying if there is actually sound playing (how ironic). The icon is useful, but only if it does what it should do.

cino commented 2 years ago

@MusicMaikel @santhosh-chinnasamy If gifs trigger the media-started-playing event I suggest we remove this feature until we have a better way of detecting sound in the webview

santhosh-chinnasamy commented 2 years ago

@cino @vraravam until we find a new way, shall we make this as an opt-in feature by adding it under global settings ?

vraravam commented 2 years ago

yes @santhosh-chinnasamy - could you please put this behind a setting?