parent
9a709d63c2
commit
1f34bd4ff7
|
@ -269,8 +269,9 @@ class Audio extends React.PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
_initAudioContext () {
|
_initAudioContext () {
|
||||||
const context = new AudioContext();
|
const AudioContext = window.AudioContext || window.webkitAudioContext;
|
||||||
const source = context.createMediaElementSource(this.audio);
|
const context = new AudioContext();
|
||||||
|
const source = context.createMediaElementSource(this.audio);
|
||||||
|
|
||||||
this.visualizer.setAudioContext(context, source);
|
this.visualizer.setAudioContext(context, source);
|
||||||
source.connect(context.destination);
|
source.connect(context.destination);
|
||||||
|
|
Loading…
Reference in New Issue