Show which tab in Metro Firefox is playing sound/audio

RESOLVED INCOMPLETE

Status

Firefox for Metro
Browser
RESOLVED INCOMPLETE
4 years ago
2 years ago

People

(Reporter: mbrubeck, Unassigned)

Tracking

({feature})

Trunk
x86_64
Windows 8.1
feature
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [parity-chrome][student project] [feature] p=0)

(Reporter)

Description

4 years ago
In desktop Firefox, it's hard to reliably determine which tab is making noise (bug 486262), because the browser doesn't get enough information from NPAPI plugins like Flash.  But since Metro Firefox does not support NPAPI plugins (bug 738600), it doesn't have that problem!

We should add code to determine when a tab uses a feature like <audio> or <video> that can make sounds (including APIs used via Shumway when it's enabled, bug 923596) and display an indicator in the tab bar until it stops.

Bug 923247 will add a notification that is sent by the observer service when media playback starts or stops.  We can add code to browser-ui.js here to observe these notifications and adjust the UI when they occur:
http://hg.mozilla.org/mozilla-central/file/fad7172d4542/browser/metro/base/content/browser-ui.js#l90
http://hg.mozilla.org/mozilla-central/file/fad7172d4542/browser/metro/base/content/browser-ui.js#l582

The observer can then set an attribute on the <documenttab> element corresponding to the appropriate tab, using code that looks something like this:

  case "media-playback": {
    let browser = Browser.getBrowserForWindow(aSubject);
    let tab = Browser.getTabForBrowser(aTab);
    // aData will be either "active" or "inactive":
    tab.chromeTab.setAttribute("media-playback", aData);
  }

...and we can use that attribute to change the appearance of the tab in our CSS stylesheet:
http://hg.mozilla.org/mozilla-central/file/fad7172d4542/browser/metro/theme/browser.css

Updated

4 years ago
Blocks: 861680
Whiteboard: [parity-chrome][student project] → [parity-chrome][student project] [feature] p=0

Updated

4 years ago
Depends on: 967627
Removing 'uiwanted' keyword as UX dependency bug has been created which blocks bug 961202.
Keywords: uiwanted

Comment 2

2 years ago
Metro is dead.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.