2013-10-14 09:53:56 -07:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* 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 09:21:06 -07:00
|
|
|
interface nsISupports;
|
|
|
|
|
2013-10-14 09:53:56 -07:00
|
|
|
[ChromeOnly,
|
|
|
|
JSImplementation="@mozilla.org/dom/peerconnectionobserver;1",
|
2013-11-01 17:49:48 -07:00
|
|
|
Constructor (mozRTCPeerConnection domPC)]
|
2013-10-14 09:53:56 -07:00
|
|
|
interface PeerConnectionObserver
|
|
|
|
{
|
|
|
|
/* JSEP callbacks */
|
|
|
|
void onCreateOfferSuccess(DOMString offer);
|
|
|
|
void onCreateOfferError(unsigned long name, DOMString message);
|
|
|
|
void onCreateAnswerSuccess(DOMString answer);
|
|
|
|
void onCreateAnswerError(unsigned long name, DOMString message);
|
|
|
|
void onSetLocalDescriptionSuccess();
|
|
|
|
void onSetRemoteDescriptionSuccess();
|
|
|
|
void onSetLocalDescriptionError(unsigned long name, DOMString message);
|
|
|
|
void onSetRemoteDescriptionError(unsigned long name, DOMString message);
|
|
|
|
void onAddIceCandidateSuccess();
|
|
|
|
void onAddIceCandidateError(unsigned long name, DOMString message);
|
|
|
|
void onIceCandidate(unsigned short level, DOMString mid, DOMString candidate);
|
|
|
|
|
2013-10-17 15:00:05 -07:00
|
|
|
/* Stats callbacks */
|
|
|
|
void onGetStatsSuccess(optional RTCStatsReportInternal report);
|
|
|
|
void onGetStatsError(unsigned long name, DOMString message);
|
|
|
|
|
2013-10-14 09:53:56 -07:00
|
|
|
/* Data channel callbacks */
|
|
|
|
void notifyDataChannel(DataChannel channel);
|
|
|
|
|
|
|
|
/* Notification of one of several types of state changed */
|
|
|
|
void onStateChange(PCObserverStateType state);
|
|
|
|
|
2014-08-13 18:40:54 -07:00
|
|
|
/* Changes to MediaStreamTracks */
|
2013-10-14 09:53:56 -07:00
|
|
|
void onAddStream(MediaStream stream);
|
|
|
|
void onRemoveStream();
|
2014-08-13 18:40:54 -07:00
|
|
|
void onAddTrack(MediaStreamTrack track);
|
2013-10-14 09:53:56 -07:00
|
|
|
void onRemoveTrack();
|
|
|
|
};
|