Hello, I'm taking a look at bug 1281833, which is to create webextensions
APIs for the work you all have done to expose a means for extensions to
hook into webrtc permissions checking and connection establishment.

For folks who aren't familiar with extensions, some quick background: prior
to webextensions, extensions run privileged javascript code that regularly
uses xpcom to directly access whatever part of the browser they want to
interact with.  Webextensions is a project in which extensions run in an
unprivileged context and use high-level extension-specific APIs to interact
with the browser.  The goals and benefits of webextensions are many but for
the purposes of this project, the important things are that the exposed
APIs should be stable (i.e., we expect to be able to maintain them even as
the underlying implementation changes) and safe (i.e., a poorly written
extension should not break the browser).

My plan is to start with the simple goal of having enough support to be
able to port the extension from this article to a webextension:
https://hacks.mozilla.org/2015/09/controlling-webrtc-
peerconnections-with-an-extension/

So, I've got a couple of questions:

First, I read through bug 1189060 in which the webrtc extension hooks were
created.  I'm concerned that I can't actually hook into the PeerConnection
establishment process in a safe way.  If extension A overrides
webrtcUI.receiveMessage in the suggested manner, then extension B does the
same, everything is fine.  But then if extension A is unloaded, there's no
way for it to unchain its handler.  It can detect this at unload time but
it can't actually do anything.  Would a patch to address this situation be
accepted?  Who would be the right person to review such a patch?
(Incidentally, I searched through the addons from addons.mozilla.org that
are indexed on DXR and there are none in the index that are using this
hook, but we don't yet have everything from AMO indexed in DXR.  That's all
to say, I don't think there's a compatibility issue with changing the
interface for this hook.)

Second, looking past PeerConnection, what other things might we want to
expose to extension authors?  In the description for bug 1281833, Adam
suggests "The ability to add, remove, or change IP addresses exposed by
PeerConnections".  This sound like a useful thing but I'm unfamiliar with
the webrtc implementation, is this even feasible?  What other things
can/should we expose?

Thanks in advance for any answers and feedback...

-Andrew
_______________________________________________
dev-media mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-media

Reply via email to