001package gwt.material.design.jscore.client.api.media;
002
003/*
004 * Copyright 2016 Google Inc.
005 *
006 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
007 * use this file except in compliance with the License. You may obtain a copy of
008 * the License at
009 *
010 * http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
014 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
015 * License for the specific language governing permissions and limitations under
016 * the License.
017 */
018
019import jsinterop.annotations.JsMethod;
020import jsinterop.annotations.JsPackage;
021import jsinterop.annotations.JsProperty;
022import jsinterop.annotations.JsType;
023
024@JsType(isNative = true, namespace = JsPackage.GLOBAL)
025public class MediaStream {
026
027    @JsProperty
028    public boolean active;
029
030    @JsProperty
031    public boolean ended;
032
033    @JsProperty
034    public String id;
035
036    @JsMethod
037    public native void addTrack(MediaStreamTrack track);
038
039    @JsMethod
040    public native MediaStream clone();
041
042    @JsMethod
043    public native MediaStreamTrack getAudioTracks();
044
045    @JsMethod
046    public native MediaStreamTrack[] getTracks();
047
048    @JsMethod
049    public native MediaStreamTrack getVideoTracks();
050
051    @JsMethod
052    public native void removeTrack(MediaStreamTrack track);
053}