2013-02-15 08:04:11 +00:00
|
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
*
|
|
|
|
|
* The origins of this IDL file are
|
|
|
|
|
* http://dev.w3.org/2011/webrtc/editor/getusermedia.html
|
|
|
|
|
*
|
|
|
|
|
* Copyright <20> 2012 W3C<33> (MIT, ERCIM, Keio), All Rights Reserved. W3C
|
|
|
|
|
* liability, trademark and document use rules apply.
|
|
|
|
|
*/
|
|
|
|
|
|
2014-04-04 09:54:25 +00:00
|
|
|
|
// These dictionaries need to be in a separate file from their
|
|
|
|
|
// MediaTrackConstraints* counterparts due to a webidl compiler limitation.
|
|
|
|
|
|
|
|
|
|
dictionary MediaStreamConstraints {
|
|
|
|
|
(boolean or MediaTrackConstraints) audio = false;
|
|
|
|
|
(boolean or MediaTrackConstraints) video = false;
|
2014-04-18 18:00:16 +00:00
|
|
|
|
boolean picture = false; // Mozilla legacy
|
2015-07-02 22:01:52 +00:00
|
|
|
|
boolean fake; // For testing purpose. Generates frames of solid
|
|
|
|
|
// colors if video is enabled, and sound of 1Khz sine
|
|
|
|
|
// wave if audio is enabled.
|
2014-05-01 10:50:00 +00:00
|
|
|
|
DOMString? peerIdentity = null;
|
2014-04-04 09:54:25 +00:00
|
|
|
|
};
|
|
|
|
|
|
2015-10-14 17:08:33 +00:00
|
|
|
|
[Exposed=Window,
|
|
|
|
|
Constructor,
|
|
|
|
|
Constructor (MediaStream stream),
|
|
|
|
|
Constructor (sequence<MediaStreamTrack> tracks)]
|
2014-10-03 08:18:00 +00:00
|
|
|
|
interface MediaStream : EventTarget {
|
2015-09-30 01:32:05 +00:00
|
|
|
|
readonly attribute DOMString id;
|
|
|
|
|
sequence<AudioStreamTrack> getAudioTracks ();
|
|
|
|
|
sequence<VideoStreamTrack> getVideoTracks ();
|
|
|
|
|
sequence<MediaStreamTrack> getTracks ();
|
2016-05-20 11:01:30 +00:00
|
|
|
|
MediaStreamTrack? getTrackById (DOMString trackId);
|
2015-09-30 01:32:05 +00:00
|
|
|
|
void addTrack (MediaStreamTrack track);
|
|
|
|
|
void removeTrack (MediaStreamTrack track);
|
2016-01-22 08:51:37 +00:00
|
|
|
|
MediaStream clone ();
|
2016-09-08 11:44:49 +00:00
|
|
|
|
readonly attribute boolean active;
|
2016-05-31 07:29:52 +00:00
|
|
|
|
attribute EventHandler onaddtrack;
|
2015-09-30 01:32:05 +00:00
|
|
|
|
// attribute EventHandler onremovetrack;
|
|
|
|
|
readonly attribute double currentTime;
|
2013-02-15 08:04:11 +00:00
|
|
|
|
};
|