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 origins of this IDL file are
7 * http://dev.w3.org/2011/webrtc/editor/getusermedia.html
9 * Copyright � 2012 W3C� (MIT, ERCIM, Keio), All Rights Reserved. W3C
10 * liability, trademark and document use rules apply.
13 // These dictionaries need to be in a separate file from their
14 // MediaTrackConstraints* counterparts due to a webidl compiler limitation.
16 dictionary MediaStreamConstraints {
17 (boolean or MediaTrackConstraints) audio = false;
18 (boolean or MediaTrackConstraints) video = false;
19 boolean picture = false; // Mozilla legacy
20 boolean fake = false; // for testing
21 DOMString? peerIdentity = null;
24 interface MediaStream {
25 // readonly attribute DOMString id;
26 sequence<AudioStreamTrack> getAudioTracks();
27 sequence<VideoStreamTrack> getVideoTracks();
28 sequence<MediaStreamTrack> getTracks();
29 // MediaStreamTrack getTrackById (DOMString trackId);
30 // void addTrack (MediaStreamTrack track);
31 // void removeTrack (MediaStreamTrack track);
32 // attribute boolean ended;
33 // attribute EventHandler onended;
34 // attribute EventHandler onaddtrack;
35 // attribute EventHandler onremovetrack;
36 readonly attribute double currentTime;