From 4618530aed8be75ef202b70819d0570bf9e70ed1 Mon Sep 17 00:00:00 2001 From: bordun Date: Mon, 23 Mar 2020 18:16:50 +0100 Subject: [PATCH] eq: soft load audio context --- src/client/widgets/graphs/eq.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/client/widgets/graphs/eq.js b/src/client/widgets/graphs/eq.js index f8319b9f..78325f13 100644 --- a/src/client/widgets/graphs/eq.js +++ b/src/client/widgets/graphs/eq.js @@ -2,7 +2,13 @@ var {mapToScale} = require('../utils'), Plot = require('./plot'), Widget = require('../common/widget'), StaticProperties = require('../mixins/static_properties'), + audioContext + +try { audioContext = new AudioContext() +} catch(e) { + audioContext = new webkitAudioContext() +} class Eq extends StaticProperties(Plot, {logScaleX: false, logScaleY:false}) {