com.github.xpenatan.gdx.backends.teavm.dom.audio.Audio Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of backend-teavm Show documentation
Show all versions of backend-teavm Show documentation
Tool to generate libgdx to javascript using teaVM
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