2013-10-14 16:53:56 +00: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 16:21:06 +00:00
|
|
|
interface nsISupports;
|
|
|
|
|
2013-10-14 16:53:56 +00:00
|
|
|
[ChromeOnly,
|
|
|
|
JSImplementation="@mozilla.org/dom/peerconnectionobserver;1",
|
2013-11-02 00:49:48 +00:00
|
|
|
Constructor (mozRTCPeerConnection domPC)]
|
2013-10-14 16:53:56 +00: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 22:00:05 +00:00
|
|
|
/* Stats callbacks */
|
|
|
|
void onGetStatsSuccess(optional RTCStatsReportInternal report);
|
|
|
|
void onGetStatsError(unsigned long name, DOMString message);
|
|
|
|
|
2013-10-14 16:53:56 +00:00
|
|
|
/* Data channel callbacks */
|
|
|
|
void notifyDataChannel(DataChannel channel);
|
|
|
|
void notifyConnection();
|
|
|
|
void notifyClosedConnection();
|
|
|
|
|
|
|
|
/* Notification of one of several types of state changed */
|
|
|
|
void onStateChange(PCObserverStateType state);
|
|
|
|
|
|
|
|
/* Changes to MediaStreams */
|
|
|
|
void onAddStream(MediaStream stream);
|
|
|
|
void onRemoveStream();
|
|
|
|
void onAddTrack();
|
|
|
|
void onRemoveTrack();
|
|
|
|
|
|
|
|
/* Helper function to access supported constraints defined in webidl. Needs to
|
|
|
|
* be in a separate webidl object we hold, so putting it here was convenient.
|
|
|
|
*/
|
2013-12-05 16:39:50 +00:00
|
|
|
MediaConstraintSet getSupportedConstraints(optional MediaConstraintSet constraints);
|
2013-10-14 16:53:56 +00:00
|
|
|
};
|