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

com.github.xpenatan.gdx.backends.teavm.dom.audio.Audio Maven / Gradle / Ivy

There is a newer version: 1.0.4
Show newest version
package com.github.xpenatan.gdx.backends.teavm.dom.audio;

import org.teavm.jso.JSBody;

public class Audio {

    public static HTMLAudioElementWrapper createIfSupported() {
        //TODO
//        if (detector == null) {
//            detector = GWT.create(AudioElementSupportDetector.class);
//        }
//        if (!detector.isSupportedCompileTime()) {
//            return null;
//        }
//        AudioElement element = Document.get().createAudioElement();
//        if (!detector.isSupportedRunTime(element)) {
//            return null;
//        }
        return createAudio();
    }

    @JSBody(script = "return new Audio();")
    private static native HTMLAudioElementWrapper createAudio();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy