Bug 1526591 - Remove devtools.inspector.shapesHighlighter.enabled pref. r=rcaliman
[gecko.git] / dom / webidl / RTCRtpTransceiver.webidl
blob5e4e81fcdbf60a7a85b894adcadef557198e2517
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4  * You can obtain one at http://mozilla.org/MPL/2.0/.
5  *
6  * The origin of this IDL file is
7  * http://w3c.github.io/webrtc-pc/#rtcrtptransceiver-interface
8  */
10 enum RTCRtpTransceiverDirection {
11     "sendrecv",
12     "sendonly",
13     "recvonly",
14     "inactive"
17 dictionary RTCRtpTransceiverInit {
18     RTCRtpTransceiverDirection         direction = "sendrecv";
19     sequence<MediaStream>              streams = [];
20     // TODO: bug 1396918
21     // sequence<RTCRtpEncodingParameters> sendEncodings;
24 [Pref="media.peerconnection.enabled",
25  JSImplementation="@mozilla.org/dom/rtptransceiver;1"]
26 interface RTCRtpTransceiver {
27     readonly attribute DOMString?                  mid;
28     [SameObject]
29     readonly attribute RTCRtpSender                sender;
30     [SameObject]
31     readonly attribute RTCRtpReceiver              receiver;
32     readonly attribute boolean                     stopped;
33              attribute RTCRtpTransceiverDirection  direction;
34     readonly attribute RTCRtpTransceiverDirection? currentDirection;
36     void stop();
37     // TODO: bug 1396922
38     // void setCodecPreferences(sequence<RTCRtpCodecCapability> codecs);
40     [ChromeOnly]
41     void setRemoteTrackId(DOMString trackId);
42     [ChromeOnly]
43     boolean remoteTrackIdIs(DOMString trackId);
45     // Mostly for testing
46     [Pref="media.peerconnection.remoteTrackId.enabled"]
47     DOMString getRemoteTrackId();
49     [ChromeOnly]
50     void setAddTrackMagic();
51     [ChromeOnly]
52     readonly attribute boolean addTrackMagic;
53     [ChromeOnly]
54     attribute boolean shouldRemove;
55     [ChromeOnly]
56     void setCurrentDirection(RTCRtpTransceiverDirection direction);
57     [ChromeOnly]
58     void setDirectionInternal(RTCRtpTransceiverDirection direction);
59     [ChromeOnly]
60     void setMid(DOMString mid);
61     [ChromeOnly]
62     void unsetMid();
63     [ChromeOnly]
64     void setStopped();
66     [ChromeOnly]
67     DOMString getKind();
68     [ChromeOnly]
69     boolean hasBeenUsedToSend();
70     [ChromeOnly]
71     void sync();
73     [ChromeOnly]
74     void insertDTMF(DOMString tones,
75                     optional unsigned long duration = 100,
76                     optional unsigned long interToneGap = 70);