elemental2.dom.MediaStreamTrack Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of elemental2-dom Show documentation
Show all versions of elemental2-dom Show documentation
Thin Java abstractions for the native Browser APIs.
The newest version!
/*
* Copyright 2018 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package elemental2.dom;
import elemental2.promise.Promise;
import jsinterop.annotations.JsFunction;
import jsinterop.annotations.JsMethod;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
@JsType(isNative = true, namespace = JsPackage.GLOBAL)
public class MediaStreamTrack implements EventTarget {
@JsFunction
public interface OnendedFn {
Object onInvoke(Event p0);
}
@JsFunction
public interface OnmuteFn {
Object onInvoke(Event p0);
}
@JsFunction
public interface OnoverconstrainedFn {
Object onInvoke(Event p0);
}
@JsFunction
public interface OnunmuteFn {
Object onInvoke(Event p0);
}
public String contentHint;
public boolean enabled;
public String id;
public String kind;
public String label;
public boolean muted;
public MediaStreamTrack.OnendedFn onended;
public MediaStreamTrack.OnmuteFn onmute;
public MediaStreamTrack.OnoverconstrainedFn onoverconstrained;
public MediaStreamTrack.OnunmuteFn onunmute;
public String readyState;
public boolean remote;
public native void addEventListener(
String type, EventListener listener, EventTarget.AddEventListenerOptionsUnionType options);
public native void addEventListener(String type, EventListener listener);
public native Promise applyConstraints();
public native Promise applyConstraints(MediaTrackConstraints constraints);
@JsMethod(name = "clone")
public native MediaStreamTrack clone_();
public native boolean dispatchEvent(Event evt);
public native MediaTrackCapabilities getCapabilities();
public native MediaTrackConstraints getConstraints();
public native MediaTrackSettings getSettings();
public native void removeEventListener(
String type, EventListener listener, EventTarget.RemoveEventListenerOptionsUnionType options);
public native void removeEventListener(String type, EventListener listener);
public native void stop();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy