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 origin of this IDL file is 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: dictionary MediaTrackConstraints : MediaTrackConstraintSet { michael@0: sequence require; michael@0: sequence advanced; michael@0: michael@0: // mobile-only backwards-compatibility for facingMode michael@0: MobileLegacyMediaTrackConstraintSet mandatory; michael@0: sequence _optional; michael@0: }; michael@0: michael@0: // TODO(jib): Remove in 6+ weeks (Bug 997365) michael@0: dictionary MobileLegacyMediaTrackConstraintSet { michael@0: VideoFacingModeEnum facingMode; michael@0: }; michael@0: michael@0: interface MediaStreamTrack { michael@0: readonly attribute DOMString kind; michael@0: readonly attribute DOMString id; michael@0: readonly attribute DOMString label; michael@0: attribute boolean enabled; michael@0: // readonly attribute MediaStreamTrackState readyState; michael@0: // readonly attribute SourceTypeEnum sourceType; michael@0: // readonly attribute DOMString sourceId; michael@0: // attribute EventHandler onstarted; michael@0: // attribute EventHandler onmute; michael@0: // attribute EventHandler onunmute; michael@0: // attribute EventHandler onended; michael@0: // any getConstraint (DOMString constraintName, optional boolean mandatory = false); michael@0: // void setConstraint (DOMString constraintName, any constraintValue, optional boolean mandatory = false); michael@0: // MediaTrackConstraints? constraints (); michael@0: // void applyConstraints (MediaTrackConstraints constraints); michael@0: // void prependConstraint (DOMString constraintName, any constraintValue); michael@0: // void appendConstraint (DOMString constraintName, any constraintValue); michael@0: // attribute EventHandler onoverconstrained; michael@0: // void stop (); michael@0: };