java.lang.Object
nl.colorize.multimedialib.renderer.teavm.Browser

public class Browser extends Object
Contains the API for calling JavaScript functions using TeaVM. This consists of general browser APIs and bindings to the parts of MultimediaLib that are implemented in JavaScript. This class therefore acts as the bridge between the TeaVM renderer implementation in Java code, and the "native" browser code implemented in JavaScript.
  • Constructor Details

    • Browser

      public Browser()
  • Method Details

    • log

      public static void log(String message)
    • getUserAgent

      public static String getUserAgent()
    • getPageWidth

      public static float getPageWidth()
    • getPageHeight

      public static float getPageHeight()
    • getScreenWidth

      public static int getScreenWidth()
    • getScreenHeight

      public static int getScreenHeight()
    • isTouchSupported

      public static boolean isTouchSupported()
    • prepareAnimationLoop

      public static void prepareAnimationLoop()
    • accessLocalStorage

      public static org.teavm.jso.browser.Storage accessLocalStorage()
    • registerErrorHandler

      public static void registerErrorHandler(ErrorCallback callback)
    • preloadFontFace

      public static void preloadFontFace(String family, String url, SuccessCallback callback)
    • writeClipboard

      public static void writeClipboard(String text)
    • getMeta

      public static String getMeta(String name, String defaultValue)
    • getPixiBridge

      public static PixiBridge getPixiBridge()
    • getThreeBridge

      public static ThreeBridge getThreeBridge()
    • getPeerJsBridge

      public static PeerjsBridge getPeerJsBridge()