Closed
Bug 1408059
Opened 7 years ago
Closed 7 years ago
Add webRTC to the tabs API
Categories
(WebExtensions :: Frontend, enhancement, P2)
WebExtensions
Frontend
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)
2.35 KB,
patch
|
Details | Diff | Splinter Review |
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.
Reporter | ||
Updated•7 years ago
|
status-firefox57:
--- → wontfix
Priority: -- → P2
Reporter | ||
Updated•7 years ago
|
Assignee: nobody → aswan
Comment 1•7 years ago
|
||
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
Comment 2•7 years ago
|
||
(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.
Assignee | ||
Comment 3•7 years ago
|
||
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
Comment 4•7 years ago
|
||
Looks like Shane is working on this (both with the attached patch and as part of bug 1423725)
Assignee: aswan → mixedpuppy
Assignee | ||
Comment 5•7 years ago
|
||
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.
Comment 6•7 years ago
|
||
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.
Assignee | ||
Updated•7 years ago
|
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•