001package gwt.material.design.jscore.client.api;
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 gwt.material.design.jquery.client.api.Functions;
020import gwt.material.design.jscore.client.api.media.Constraints;
021import gwt.material.design.jscore.client.api.media.MediaDevices;
022import gwt.material.design.jscore.client.api.media.MediaStream;
023import jsinterop.annotations.JsMethod;
024import jsinterop.annotations.JsPackage;
025import jsinterop.annotations.JsType;
026
027@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "navigator")
028public class Navigator {
029
030    public static String appCodeName;
031    public static String appName;
032    public static String appVersion;
033    public static boolean cookieEnabled;
034    public static String language;
035    public static MediaDevices mediaDevices;
036    public static boolean onLine;
037    public static String platform;
038    public static String product;
039    public static String userAgent;
040
041    public static MediaStream getMedia;
042    public static MediaStream getUserMedia;
043    public static MediaStream webkitGetUserMedia;
044    public static MediaStream mozGetUserMedia;
045    public static MediaStream msGetUserMedia;
046
047    @JsMethod
048    public static native void getMedia(Constraints constraints, Functions.Func1<MediaStream> successCallback, Functions.Func1<String> failureCallback);
049
050}