2013-02-15 12:04:11 +04: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 13:54:25 +04: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 22:00:16 +04:00
|
|
|
|
boolean picture = false; // Mozilla legacy
|
2015-07-03 01:01:52 +03: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 14:50:00 +04:00
|
|
|
|
DOMString? peerIdentity = null;
|
2014-04-04 13:54:25 +04:00
|
|
|
|
};
|
|
|
|
|
|
2015-10-14 20:08:33 +03:00
|
|
|
|
[Exposed=Window,
|
|
|
|
|
Constructor,
|
|
|
|
|
Constructor (MediaStream stream),
|
|
|
|
|
Constructor (sequence<MediaStreamTrack> tracks)]
|
2014-10-03 12:18:00 +04:00
|
|
|
|
interface MediaStream : EventTarget {
|
2015-09-30 04:32:05 +03:00
|
|
|
|
readonly attribute DOMString id;
|
|
|
|
|
sequence<AudioStreamTrack> getAudioTracks ();
|
|
|
|
|
sequence<VideoStreamTrack> getVideoTracks ();
|
|
|
|
|
sequence<MediaStreamTrack> getTracks ();
|
2016-05-20 14:01:30 +03:00
|
|
|
|
MediaStreamTrack? getTrackById (DOMString trackId);
|
2015-09-30 04:32:05 +03:00
|
|
|
|
void addTrack (MediaStreamTrack track);
|
|
|
|
|
void removeTrack (MediaStreamTrack track);
|
2016-01-22 11:51:37 +03:00
|
|
|
|
MediaStream clone ();
|
2016-09-08 14:44:49 +03:00
|
|
|
|
readonly attribute boolean active;
|
2016-05-31 10:29:52 +03:00
|
|
|
|
attribute EventHandler onaddtrack;
|
2015-09-30 04:32:05 +03:00
|
|
|
|
// attribute EventHandler onremovetrack;
|
|
|
|
|
readonly attribute double currentTime;
|
2013-02-15 12:04:11 +04:00
|
|
|
|
};
|