From 92c571c646e429d3a4227fa85eb9c6fa4ffc1d26 Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Thu, 3 May 2018 07:10:16 -0700 Subject: [PATCH] Disable channel checking since it breaks Safari https://github.com/captbaritone/webamp/issues/551 --- js/media/detectChannels.js | 3 +++ js/media/index.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/js/media/detectChannels.js b/js/media/detectChannels.js index 6aaaa164..6f283156 100644 --- a/js/media/detectChannels.js +++ b/js/media/detectChannels.js @@ -16,6 +16,9 @@ function createAnalysers(source) { rightGain.connect(rightAnalyser); function destroy() { + // TODO: Safari, and maybe Firefox, don't support passing the destination + // argument which means in Safari, this will disconnect `source` completely, + // which will silence the audio. source.disconnect(splitter); splitter.disconnect(); leftGain.disconnect(); diff --git a/js/media/index.js b/js/media/index.js index 676bcca0..89b1c68e 100644 --- a/js/media/index.js +++ b/js/media/index.js @@ -205,6 +205,8 @@ export default class Media { async play() { await this._source.play(); if (this._channels == null) { + // Temporarily disabled https://github.com/captbaritone/webamp/issues/551 + /* detectChannels(this._staticSource) .then(channels => { this._setChannels(channels); @@ -212,6 +214,7 @@ export default class Media { .catch(() => { this._setChannels(null); }); + */ } }