aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webidls/MediaStream.webidl
blob: b1d5664a7f7fa49891ee9bdae92f41327d68cbe0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* 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 https://mozilla.org/MPL/2.0/. */

// https://w3c.github.io/mediacapture-main/#dom-mediastream

[Exposed=Window,
 Constructor,
 Constructor(MediaStream stream),
 Constructor(sequence<MediaStreamTrack> tracks),
Pref="dom.webrtc.enabled"]
interface MediaStream : EventTarget {
    // readonly        attribute DOMString id;
    sequence<MediaStreamTrack> getAudioTracks();
    sequence<MediaStreamTrack> getVideoTracks();
    sequence<MediaStreamTrack> getTracks();
    MediaStreamTrack? getTrackById(DOMString trackId);
    void addTrack(MediaStreamTrack track);
    void removeTrack(MediaStreamTrack track);
    MediaStream clone();
    // readonly        attribute boolean active;
    //                 attribute EventHandler onaddtrack;
    //                 attribute EventHandler onremovetrack;
};