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/.
6 * The origin of this IDL file is
7 * http://w3c.github.io/webrtc-pc/#rtcrtptransceiver-interface
10 enum RTCRtpTransceiverDirection {
17 dictionary RTCRtpTransceiverInit {
18 RTCRtpTransceiverDirection direction = "sendrecv";
19 sequence<MediaStream> streams = [];
21 // sequence<RTCRtpEncodingParameters> sendEncodings;
24 [Pref="media.peerconnection.enabled",
25 JSImplementation="@mozilla.org/dom/rtptransceiver;1"]
26 interface RTCRtpTransceiver {
27 readonly attribute DOMString? mid;
29 readonly attribute RTCRtpSender sender;
31 readonly attribute RTCRtpReceiver receiver;
32 readonly attribute boolean stopped;
33 attribute RTCRtpTransceiverDirection direction;
34 readonly attribute RTCRtpTransceiverDirection? currentDirection;
38 // void setCodecPreferences(sequence<RTCRtpCodecCapability> codecs);
41 void setRemoteTrackId(DOMString trackId);
43 boolean remoteTrackIdIs(DOMString trackId);
46 [Pref="media.peerconnection.remoteTrackId.enabled"]
47 DOMString getRemoteTrackId();
50 void setAddTrackMagic();
52 readonly attribute boolean addTrackMagic;
54 attribute boolean shouldRemove;
56 void setCurrentDirection(RTCRtpTransceiverDirection direction);
58 void setDirectionInternal(RTCRtpTransceiverDirection direction);
60 void setMid(DOMString mid);
69 boolean hasBeenUsedToSend();
74 void insertDTMF(DOMString tones,
75 optional unsigned long duration = 100,
76 optional unsigned long interToneGap = 70);