Closed Bug 1408059 Opened 7 years ago Closed 7 years ago

Add webRTC to the tabs API

Categories

(WebExtensions :: Frontend, enhancement, P2)

enhancement

Tracking

(firefox57 wontfix)

RESOLVED DUPLICATE of bug 1423725
Tracking Status
firefox57 --- wontfix

People

(Reporter: andy+bugzilla, Assigned: mixedpuppy)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Currently the tabs.Tab API shows if a tab is emitting audio, but it does not do that for if a tab has been granted audio or video permissions. https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/tabs/Tab Having this API would give developers a reasonable chance to replace the tab strip with something else.
Priority: -- → P2
Assignee: nobody → aswan
It would be nice if this API could be consistent with the contentSettings API, by using similar property names (microphone, camera, ...). https://developer.chrome.com/extensions/contentSettings
(In reply to Andy McKay [:andym] from comment #0) > Having this API would give developers a reasonable chance to replace the tab > strip with something else. Since we don't show this in the current tab strip, this bug doesn't really have any bearing on writing a replacement tab strip. But it seems like a reasonable thing for developers who do such a thing to be able to include. Looks like we have this information in a property on tabbrowser: https://searchfox.org/mozilla-central/rev/f5f1c3f294f89cfd242c3af9eb2c40d19d5e04e7/browser/base/content/tabbrowser.xml#1537 Reading that property is easy enough but I would think this is only useful if browser.tabs.onChanged() fires when that property changes. There's currently no event we can listen to from webextensions code to handle that, presumably we would add one to properly implement this.
Attached patch sharingtab (deleted) — Splinter Review
I was just looking at this and related stuff for tab hiding. We can just watch the "sharing" attribute change, which we already do for many of the onupdated notifications. tab._sharingState will have one or more of screen, microphone and camera. Something like the attached should work. Otherwise, possibly listen for the global and browser messages as happens here: https://searchfox.org/mozilla-central/source/browser/modules/webrtcUI.jsm#264
Looks like Shane is working on this (both with the attached patch and as part of bug 1423725)
Assignee: aswan → mixedpuppy
Yeah, since we don't want to hide webrtc tabs, I needed it as part of that effort. Totally forgot about this bug. I'm inclined to dup this to the tabhide bug.
That works for me. If I may be pedantic for a moment, can we talk about "media devices" or something instead of webrtc? When I hear webrtc I think about network connections, these are often used in conjunction with the camera/microphone, but the two can be (and are) used independently.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: