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/.
11 required PCError name;
12 required DOMString message;
13 // Will need to add more stuff (optional) for RTCError
17 JSImplementation="@mozilla.org/dom/peerconnectionobserver;1",
19 interface PeerConnectionObserver
22 constructor(RTCPeerConnection domPC);
25 undefined onCreateOfferSuccess(DOMString offer);
26 undefined onCreateOfferError(PCErrorData error);
27 undefined onCreateAnswerSuccess(DOMString answer);
28 undefined onCreateAnswerError(PCErrorData error);
29 undefined onSetDescriptionSuccess();
30 undefined onSetDescriptionError(PCErrorData error);
31 undefined onAddIceCandidateSuccess();
32 undefined onAddIceCandidateError(PCErrorData error);
33 undefined onIceCandidate(unsigned short level, DOMString mid, DOMString candidate, DOMString ufrag);
35 /* Data channel callbacks */
36 undefined notifyDataChannel(RTCDataChannel channel);
38 /* Notification of one of several types of state changed */
39 undefined onStateChange(PCObserverStateType state);
42 Lets PeerConnectionImpl fire track events on the RTCPeerConnection
44 undefined fireTrackEvent(RTCRtpReceiver receiver, sequence<MediaStream> streams);
47 Lets PeerConnectionImpl fire addstream events on the RTCPeerConnection
49 undefined fireStreamEvent(MediaStream stream);
51 undefined fireNegotiationNeededEvent();
53 /* Packet dump callback */
54 undefined onPacket(unsigned long level, mozPacketDumpType type, boolean sending,