michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: * michael@0: * The origins of this IDL file are michael@0: * http://dev.w3.org/2011/webrtc/editor/getusermedia.html michael@0: * michael@0: * Copyright � 2012 W3C� (MIT, ERCIM, Keio), All Rights Reserved. W3C michael@0: * liability, trademark and document use rules apply. michael@0: */ michael@0: michael@0: // These dictionaries need to be in a separate file from their michael@0: // MediaTrackConstraints* counterparts due to a webidl compiler limitation. michael@0: michael@0: dictionary MediaStreamConstraints { michael@0: (boolean or MediaTrackConstraints) audio = false; michael@0: (boolean or MediaTrackConstraints) video = false; michael@0: boolean picture = false; // Mozilla legacy michael@0: boolean fake = false; // for testing michael@0: }; michael@0: michael@0: interface MediaStream { michael@0: // readonly attribute DOMString id; michael@0: sequence getAudioTracks (); michael@0: sequence getVideoTracks (); michael@0: // MediaStreamTrack getTrackById (DOMString trackId); michael@0: // void addTrack (MediaStreamTrack track); michael@0: // void removeTrack (MediaStreamTrack track); michael@0: // attribute boolean ended; michael@0: // attribute EventHandler onended; michael@0: // attribute EventHandler onaddtrack; michael@0: // attribute EventHandler onremovetrack; michael@0: readonly attribute double currentTime; michael@0: };