forked from treehouse/mastodon
[Glitch] Fix new audio player features not working on Safari
Port 51b5bb5301
to glitch-soc
Signed-off-by: Thibaut Girka <thib@sitedethib.com>
rebase/4.0.0rc2
parent
8f3295f212
commit
de7ba22c45
|
@ -254,8 +254,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