小程序有办法获取声音的频率吗?
发布于 7 年前 作者 jingduan 7349 次浏览 来自 问答

H5的这些接口有办法调用吗?

window.AudioContext = window.AudioContext || window.webkitAudioContext || window.mozAudioContext || window.msAudioContext;

        window.requestAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame;

        window.cancelAnimationFrame = window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.msCancelAnimationFrame;

        try {

            this.audioContext = new AudioContext();

        } catch (e) {

            this._updateInfo(’!Your browser does not support AudioContext’, false);

            console.log(e);

        }

回到顶部