All Downloads are FREE. Search and download functionalities are using the official Maven repository.

elemental2.dom.Navigator Maven / Gradle / Ivy

There is a newer version: 1.0.139
Show newest version
package elemental2.dom;

import elemental2.promise.Promise;
import jsinterop.annotations.JsFunction;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;

@JsType(isNative = true, namespace = JsPackage.GLOBAL)
public class Navigator {
  @JsFunction
  public interface WebkitGetUserMediaErrorCallbackFn {
    Object onInvoke(NavigatorUserMediaError p0);
  }

  @JsFunction
  public interface WebkitGetUserMediaSuccessCallbackFn {
    Object onInvoke(MediaStream p0);
  }

  public String appCodeName;
  public String appName;
  public String appVersion;
  public boolean cookieEnabled;
  public Geolocation geolocation;
  public String language;
  public MediaDevices mediaDevices;
  public MimeTypeArray mimeTypes;
  public boolean onLine;
  public String platform;
  public PluginArray plugins;
  public String product;
  public ServiceWorkerContainer serviceWorker;
  public String userAgent;

  public native Promise getBattery();

  public native boolean javaEnabled();

  public native void registerContentHandler(String mimeType, String url, String title);

  public native void registerProtocolHandler(String scheme, String url, String title);

  public native boolean taintEnabled();

  public native void unregisterContentHandler(String mimeType, String url);

  public native void unregisterProtocolHandler(String scheme, String url);

  public native void webkitGetUserMedia(
      MediaStreamConstraints constraints,
      Navigator.WebkitGetUserMediaSuccessCallbackFn successCallback,
      Navigator.WebkitGetUserMediaErrorCallbackFn errorCallback);

  public native void webkitGetUserMedia(
      MediaStreamConstraints constraints,
      Navigator.WebkitGetUserMediaSuccessCallbackFn successCallback);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy