dom/webidl/PeerConnectionObserver.webidl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/webidl/PeerConnectionObserver.webidl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,49 @@
     1.4 +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this file,
     1.7 + * You can obtain one at http://mozilla.org/MPL/2.0/.
     1.8 + */
     1.9 +
    1.10 +interface nsISupports;
    1.11 +
    1.12 +[ChromeOnly,
    1.13 + JSImplementation="@mozilla.org/dom/peerconnectionobserver;1",
    1.14 + Constructor (mozRTCPeerConnection domPC)]
    1.15 +interface PeerConnectionObserver
    1.16 +{
    1.17 +  /* JSEP callbacks */
    1.18 +  void onCreateOfferSuccess(DOMString offer);
    1.19 +  void onCreateOfferError(unsigned long name, DOMString message);
    1.20 +  void onCreateAnswerSuccess(DOMString answer);
    1.21 +  void onCreateAnswerError(unsigned long name, DOMString message);
    1.22 +  void onSetLocalDescriptionSuccess();
    1.23 +  void onSetRemoteDescriptionSuccess();
    1.24 +  void onSetLocalDescriptionError(unsigned long name, DOMString message);
    1.25 +  void onSetRemoteDescriptionError(unsigned long name, DOMString message);
    1.26 +  void onAddIceCandidateSuccess();
    1.27 +  void onAddIceCandidateError(unsigned long name, DOMString message);
    1.28 +  void onIceCandidate(unsigned short level, DOMString mid, DOMString candidate);
    1.29 +
    1.30 +  /* Stats callbacks */
    1.31 +  void onGetStatsSuccess(optional RTCStatsReportInternal report);
    1.32 +  void onGetStatsError(unsigned long name, DOMString message);
    1.33 +
    1.34 +  /* Data channel callbacks */
    1.35 +  void notifyDataChannel(DataChannel channel);
    1.36 +  void notifyConnection();
    1.37 +  void notifyClosedConnection();
    1.38 +
    1.39 +  /* Notification of one of several types of state changed */
    1.40 +  void onStateChange(PCObserverStateType state);
    1.41 +
    1.42 +  /* Changes to MediaStreams */
    1.43 +  void onAddStream(MediaStream stream);
    1.44 +  void onRemoveStream();
    1.45 +  void onAddTrack();
    1.46 +  void onRemoveTrack();
    1.47 +
    1.48 +  /* Helper function to access supported constraints defined in webidl. Needs to
    1.49 +   * be in a separate webidl object we hold, so putting it here was convenient.
    1.50 +   */
    1.51 +  MediaConstraintSet getSupportedConstraints(optional MediaConstraintSet constraints);
    1.52 +};

mercurial