Browse Source

Fix new audio player features not working on Safari (#14465)

Fixes #14462
closed-social-v3
ThibG 4 years ago
committed by GitHub
parent
commit
51b5bb5301
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      app/javascript/mastodon/features/audio/index.js

+ 3
- 2
app/javascript/mastodon/features/audio/index.js View File

@ -269,8 +269,9 @@ class Audio extends React.PureComponent {
}
_initAudioContext () {
const context = new AudioContext();
const source = context.createMediaElementSource(this.audio);
const AudioContext = window.AudioContext || window.webkitAudioContext;
const context = new AudioContext();
const source = context.createMediaElementSource(this.audio);
this.visualizer.setAudioContext(context, source);
source.connect(context.destination);

Loading…
Cancel
Save