[pulseaudio-discuss] [RFC] Per-client flat-volumes control
Arun Raghavan
arun at accosted.net
Tue Aug 5 17:31:35 PDT 2014
On 6 August 2014 01:12, Alexander E. Patrakov <patrakov at gmail.com> wrote:
> 06.08.2014 00:54, Arun Raghavan wrote:
>>
>> Hi folks,
>> Alexander's already brought up the issue of websites that can set the
>> volume on
>> a stream programmatically, and either unwittingly or malicious set the
>> system
>> volume to 100% when using flat-volumes, and while I've been against having
>> to
>> deal with this on the PulseAudio side, I think we will have to after all.
>>
>> The practical part of this problem really is websites that set the stream
>> volume to 1.0 as intialisation. There's nothing in the HTML5 spec that
>> mandates
>> this, but that doesn't seem to be stopping people from doing this. The
>> Firefox
>> folks, who are trying to use PA stream volumes are now also hitting this.
>>
>> I like how flat-volumes work on the desktop (and I know this is not a
>> unanimous
>> view), but pragmatically, for the website case, there does not seem to be
>> a way
>> to make this work. As a compromise, I propose a mechanism to allow streams
>> to
>> disable flat volumes for themselves. I'm attaching a patch that does this
>> (which needs more thorough review by myself as well).
>>
>> Thoughts?
>
>
> [please treat this e-mail as neutral thoughts, i.e. neither support nor
> opposition, even though the text reads as opposition]
>
> If your patch is applied, I think (I have not tested) that there will be
> inconsistency in the volume controls displayed by the GUIs. I.e. the desired
> position of some volume controls would be 100%, and of the others it would
> be much less, and there is no real way for the user to discern, except by
> listening.
Yes. I think this is inevitable if (as I want), we continue to keep
the global flat volume concept.
> I think that the real problem that needs to be solved is not only that flat
> volumes are inapplicable to the web, but also that PulseAudio doesn't
> provide any API for intra-application mixing. Please see my earlier thoughts
> on it here (point 7):
>
> http://lists.freedesktop.org/archives/pulseaudio-discuss/2014-February/019968.html
>
> In other words: please add new API that would allow a browser to implement a
> per-tab (flat or non-flat, as configured in daemon.conf) visible volume
> control, with several substreams being mixed for each tab by PulseAudio. The
> javascript inside the browser should be able to set, invisibly for the user,
> tab-relative (and thus non-flat) volumes for each substream.
I don't think this really feasible - in this case, you need some way
to control per-tab volume as well, and that's a UI change that we are
in no position to effect across browsers.
Regards,
Arun
More information about the pulseaudio-discuss
mailing list