1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/.
8 Right now, it is not possible to add static functions to a JS implemented
9 interface (see bug 863952), so we need to create a simple interface with a
10 trivial constructor and no data to hold these functions that really ought to
11 be static in RTCPeerConnection.
12 TODO(bcampen@mozilla.com) Merge this code into RTCPeerConnection once this
13 limitation is gone. (Bug 1017082)
16 enum RTCLifecycleEvent {
18 "icegatheringstatechange",
19 "iceconnectionstatechange",
20 "connectionstatechange",
23 callback PeerConnectionLifecycleCallback = undefined (RTCPeerConnection pc,
24 unsigned long long windowId,
25 RTCLifecycleEvent eventType);
28 Pref="media.peerconnection.enabled",
29 JSImplementation="@mozilla.org/dom/peerconnectionstatic;1",
31 interface RTCPeerConnectionStatic {
35 /* One slot per window (the window in which the register call is made),
36 automatically unregistered when window goes away.
37 Fires when a PC is created, and whenever the ICE connection state or
38 gathering state changes. */
39 undefined registerPeerConnectionLifecycleCallback(
40 PeerConnectionLifecycleCallback cb);