Closed Bug 961202 Opened 9 years ago Closed 8 years ago

Show which tab in Metro Firefox is playing sound/audio


(Firefox for Metro Graveyard :: Browser, defect)

Windows 8.1
Not set


(Not tracked)



(Reporter: mbrubeck, Unassigned)



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

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:

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:
Blocks: metrobacklog
Whiteboard: [parity-chrome][student project] → [parity-chrome][student project] [feature] p=0
Depends on: 967627
Removing 'uiwanted' keyword as UX dependency bug has been created which blocks bug 961202.
Keywords: uiwanted
Metro is dead.
Closed: 8 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.