jaedb / Iris

Discover, explore and manage your music library across multiple sources with this beautiful web-based interface. Iris is a Mopidy frontend extension.
Apache License 2.0
1.13k stars 132 forks source link

Disable Audio Controls #789

Open Monksman45 opened 2 years ago

Monksman45 commented 2 years ago

Problem to solve

I'd like to add a config that would allow you to disable the volume control. I have a fairly expensive audio setup, but like to let my friends and family play music through their phones. I just don't want someone to accidentally turn the volume to max and blow my speakers out.

Proposed solution

Add a config value for iris, I'm thinking something like disable-volume-control that could be set to true to hide the volume control.

Additional info

I'm planning on implementing this to my local build, but wondering if anyone else would like to see that be a feature.

jaedb commented 2 years ago

An alternative approach would be to take a page out of Android's book with how they handle max volume when using headphones. It prompts that the volume is too loud for extending durations, but doesn't block it after the prompt. Basically it is a 'soft' limit.

Also worth considering is other mechanisms that control volume (Snapcast integration for instance), as well as keyboard shortcuts. There are a few moving parts to making this a complete feature.

But indeed, I think gauging demand is the first step.

loryanstrant commented 2 years ago

I'd also like this functionality. I've embedded Iris in an iFrame on my Home Assistant device, and have an automation that passes the Spotify track from Mopidy to Sonos. Because of this - Mopidy doesn't know of any actual audio output device, therefore Iris doesn't... therefore the volume control within Iris doesn't actually do anything. To allow volume control, I've had to add a separate card on my HA dashboard that controls the volume of the Sonos speaker I'm outputting Mopidy to (a dedicated one for the particular tablet). But I'd love to remove the volume in Iris so my young daughters don't get confused by it. :-)

2e0byo commented 2 years ago

@loryanstrant the other option btw would be to write a mopidy mixer plugin to control sonos volume, and then iris' volume control would work. In theory it's just an api call/upnp message, but I've not tried it.

jaedb commented 1 year ago

I have achieved something similar by using Iris Commands. This allows you to set up arbitrary API calls that can be triggered by buttons within the 'Outputs' panel in the Iris UI.

Screenshot_20230220_200130_Chrome.png

In this screenshot you can see + and -, those trigger a HTTP request to my infrared blaster, and on to my lounge amplifier.

Not perfect, but perfectly capable.

See more in Commands