使用howler 播放音频时,会遇到资源跨域报错,因为Howler默认使用Web Audio,但在IE上可以自动转为HTML 5 Audio,而web audio兼容性不是很好,可以使用HTML 5 Audio
this.sound = new Howl({src: [this.src],preload: this.preload,html5: true, // 设置为true 页面将使用原生video 标签渲染 不会导致资源跨域的情况onload: (e) => {this.duration = this.sound.duration()this.loading = false},onplay: this.setInterval,onpause: this.clearInterval,onend: this.setEnd})