[Glitch] Fix new audio player features not working on Safari
Port 1f34bd4ff7 to glitch-soc
Signed-off-by: Thibaut Girka <thib@sitedethib.com>
			
			
This commit is contained in:
		
							parent
							
								
									3ddc3ce6ca
								
							
						
					
					
						commit
						3ee1ac54d2
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		|  | @ -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 a new issue