Open
Bug 1341559
Opened 7 years ago
Updated 2 years ago
Expose volume per Tabs to WebExtensions
Categories
(WebExtensions :: General, defect, P5)
WebExtensions
General
Tracking
(Not tracked)
REOPENED
People
(Reporter: baku, Unassigned)
Details
(Whiteboard: [triaged] tabs)
For each window we have a full control of the mute/unmute state and the volume. I think it would be nice to expose this values (read/write) to WebExtensions. We should also send a notification when a page starts/stops producing audio.
Reporter | ||
Comment 1•7 years ago
|
||
I think a nice way to expose this feature would be to extend the Window object introducing: Window.audio instanceOf WindowAudio WindowAudio { float volume; bool muted; } Note that we can have muted = true and volume = 1.0. muted doesn't mean volume == 0. About callbacks: browser.windows.onAudioChanged = function(Window) { ...
Reporter | ||
Comment 2•7 years ago
|
||
It seems we have something for 'mute' here: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/tabs We should extend it in order to support volume as well.
Reporter | ||
Updated•7 years ago
|
Summary: Expose volume/mute per window to WebExtensions → Expose volume per Tabs to WebExtensions
Comment 3•7 years ago
|
||
We already support the mute property on tabs (both for reading its state and to update it), and so I think that it "sounds" more than reasonable to expose a similar feature for the actual volume. If we want to provide it through an API similar to how the mute is currently exposed, the API could be probably something like: ``` browser.tabs.onUpdated.addListener((tab) => { console.log("Tab volume", tab.volume); }); browser.tabs.update(tabId, {volume: 20}); ``` Side notes: the mute is also visible in the browser UI as a small icon in the tab UI, and the user can mute/unmute the tab by clicking on it. Is the volume currently accessible somewhere from the existent browser UI? In other words, if the user cannot change or restore the volume otherwise, what should it happen if the addon has been disabled/uninstalled?
Reporter | ||
Comment 4•7 years ago
|
||
> In other words, if the user cannot change or restore the volume otherwise,
> what should it happen if the addon has been disabled/uninstalled?
This is actually a good point. I don't have an answer. Is this a blocker for implementing this feature?
Comment 5•7 years ago
|
||
We already expose muting and sound playing information (including notifications when it changes) via the tabs API. We don't expose volume information, though. If we want to expose muting at a browser window level in addition to the tab level, I suppose that would be doable enough.
Updated•7 years ago
|
Priority: -- → P5
Whiteboard: [triaged] tabs
Comment 6•6 years ago
|
||
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
Updated•6 years ago
|
Status: RESOLVED → REOPENED
Resolution: INACTIVE → ---
Updated•6 years ago
|
Product: Toolkit → WebExtensions
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•