Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix new audio player features not working on Safari #14465

Merged
merged 1 commit into from
Aug 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix new audio player features not working on Safari
Fixes #14462
  • Loading branch information
ClearlyClaire committed Jul 28, 2020
commit 10b6ddc6cee6a061be8f3707d8bc0d4135b92753
5 changes: 3 additions & 2 deletions app/javascript/mastodon/features/audio/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down