Update src/plugins/htmlAudioPlayer/plugin.js

Co-authored-by: Dmitry Lyzo <56478732+dmitrylyzo@users.noreply.github.com>
This commit is contained in:
TelepathicWalrus 2023-05-23 20:17:33 +01:00 committed by GitHub
parent 815b7f9f1e
commit c9b7f834ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -264,7 +264,9 @@ class HtmlAudioPlayer {
function addGainElement(elem) {
try {
const audioCtx = new AudioContext(); /* eslint-disable-line compat/compat */
const AudioContext = window.AudioContext || window.webkitAudioContext; /* eslint-disable-line compat/compat */
const audioCtx = new AudioContext();
const source = audioCtx.createMediaElementSource(elem);
const gainNode = audioCtx.createGain();