2013-10-14 20:53:56 +04: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 20:21:06 +04:00
|
|
|
interface nsISupports;
|
|
|
|
|
2013-10-14 20:53:56 +04:00
|
|
|
[ChromeOnly,
|
|
|
|
JSImplementation="@mozilla.org/dom/peerconnectionobserver;1",
|
2015-09-28 21:25:04 +03:00
|
|
|
Constructor (RTCPeerConnection domPC)]
|
2013-10-14 20:53:56 +04: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);
|
2014-12-11 02:53:54 +03:00
|
|
|
void onNegotiationNeeded();
|
2013-10-14 20:53:56 +04:00
|
|
|
|
2013-10-18 02:00:05 +04:00
|
|
|
/* Stats callbacks */
|
|
|
|
void onGetStatsSuccess(optional RTCStatsReportInternal report);
|
|
|
|
void onGetStatsError(unsigned long name, DOMString message);
|
|
|
|
|
2014-08-15 09:33:09 +04:00
|
|
|
/* replaceTrack callbacks */
|
|
|
|
void onReplaceTrackSuccess();
|
|
|
|
void onReplaceTrackError(unsigned long name, DOMString message);
|
|
|
|
|
2013-10-14 20:53:56 +04:00
|
|
|
/* Data channel callbacks */
|
|
|
|
void notifyDataChannel(DataChannel channel);
|
|
|
|
|
|
|
|
/* Notification of one of several types of state changed */
|
|
|
|
void onStateChange(PCObserverStateType state);
|
|
|
|
|
2014-08-14 05:40:54 +04:00
|
|
|
/* Changes to MediaStreamTracks */
|
2013-10-14 20:53:56 +04:00
|
|
|
void onAddStream(MediaStream stream);
|
2014-12-11 02:53:54 +03:00
|
|
|
void onRemoveStream(MediaStream stream);
|
2016-01-12 23:09:01 +03:00
|
|
|
void onAddTrack(MediaStreamTrack track, sequence<MediaStream> streams);
|
2014-12-11 02:53:54 +03:00
|
|
|
void onRemoveTrack(MediaStreamTrack track);
|
2013-10-14 20:53:56 +04:00
|
|
|
};
|