2018-09-13 23:04:55 +03:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2013-10-14 20:53:56 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*/
|
|
|
|
|
2013-10-19 20:21:06 +04:00
|
|
|
interface nsISupports;
|
|
|
|
|
2019-04-02 16:08:18 +03:00
|
|
|
dictionary PCErrorData
|
|
|
|
{
|
|
|
|
required PCError name;
|
|
|
|
required DOMString message;
|
|
|
|
// Will need to add more stuff (optional) for RTCError
|
|
|
|
};
|
|
|
|
|
2013-10-14 20:53:56 +04:00
|
|
|
[ChromeOnly,
|
2019-09-12 14:01:17 +03:00
|
|
|
JSImplementation="@mozilla.org/dom/peerconnectionobserver;1"]
|
2013-10-14 20:53:56 +04:00
|
|
|
interface PeerConnectionObserver
|
|
|
|
{
|
2019-09-12 14:01:17 +03:00
|
|
|
[Throws]
|
|
|
|
constructor(RTCPeerConnection domPC);
|
|
|
|
|
2013-10-14 20:53:56 +04:00
|
|
|
/* JSEP callbacks */
|
|
|
|
void onCreateOfferSuccess(DOMString offer);
|
2019-04-02 16:08:18 +03:00
|
|
|
void onCreateOfferError(PCErrorData error);
|
2013-10-14 20:53:56 +04:00
|
|
|
void onCreateAnswerSuccess(DOMString answer);
|
2019-04-02 16:08:18 +03:00
|
|
|
void onCreateAnswerError(PCErrorData error);
|
2013-10-14 20:53:56 +04:00
|
|
|
void onSetLocalDescriptionSuccess();
|
|
|
|
void onSetRemoteDescriptionSuccess();
|
2019-04-02 16:08:18 +03:00
|
|
|
void onSetLocalDescriptionError(PCErrorData error);
|
|
|
|
void onSetRemoteDescriptionError(PCErrorData error);
|
2013-10-14 20:53:56 +04:00
|
|
|
void onAddIceCandidateSuccess();
|
2019-04-02 16:08:18 +03:00
|
|
|
void onAddIceCandidateError(PCErrorData error);
|
2019-03-08 18:24:27 +03:00
|
|
|
void onIceCandidate(unsigned short level, DOMString mid, DOMString candidate, DOMString ufrag);
|
2013-10-14 20:53:56 +04:00
|
|
|
|
2013-10-18 02:00:05 +04:00
|
|
|
/* Stats callbacks */
|
2019-07-03 10:52:35 +03:00
|
|
|
void onGetStatsSuccess(optional RTCStatsReportInternal report = {});
|
2019-04-02 16:08:18 +03:00
|
|
|
void onGetStatsError(DOMString message);
|
2013-10-18 02:00:05 +04:00
|
|
|
|
2013-10-14 20:53:56 +04:00
|
|
|
/* Data channel callbacks */
|
2018-02-10 01:36:48 +03:00
|
|
|
void notifyDataChannel(RTCDataChannel channel);
|
2013-10-14 20:53:56 +04:00
|
|
|
|
|
|
|
/* Notification of one of several types of state changed */
|
|
|
|
void onStateChange(PCObserverStateType state);
|
|
|
|
|
2017-08-23 23:47:54 +03:00
|
|
|
/* Transceiver management; called when setRemoteDescription causes a
|
|
|
|
transceiver to be created on the C++ side */
|
|
|
|
void onTransceiverNeeded(DOMString kind, TransceiverImpl transceiverImpl);
|
2016-09-14 15:53:23 +03:00
|
|
|
|
|
|
|
/* DTMF callback */
|
2017-08-23 23:47:54 +03:00
|
|
|
void onDTMFToneChange(MediaStreamTrack track, DOMString tone);
|
2017-06-30 03:14:06 +03:00
|
|
|
|
|
|
|
/* Packet dump callback */
|
|
|
|
void onPacket(unsigned long level, mozPacketDumpType type, boolean sending,
|
|
|
|
ArrayBuffer packet);
|
2017-08-23 23:47:54 +03:00
|
|
|
|
|
|
|
/* Transceiver sync */
|
|
|
|
void syncTransceivers();
|
2013-10-14 20:53:56 +04:00
|
|
|
};
|