UNPKG

playcanvas

Version:

Open-source WebGL/WebGPU 3D engine for the web

10 lines (8 loc) 301 B
/** * Reports whether this device supports the Web Audio API. * * @returns {boolean} True if Web Audio is supported and false otherwise. */ function hasAudioContext() { return !!(typeof AudioContext !== 'undefined' || typeof webkitAudioContext !== 'undefined'); } export { hasAudioContext };