Created
October 18, 2017 13:18
-
-
Save owenstrevor/d18dd433d00051183dcacbcfb74cd39d to your computer and use it in GitHub Desktop.
ChannelMergerNode HTML5 Audio - Play in both speakers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var audioCtx = new (window.AudioContext || window.webkitAudioContext)(); | |
var myAudio = document.querySelector('audio'); | |
var source = audioCtx.createMediaElementSource(myAudio); | |
var merger = audioCtx.createChannelMerger(1); | |
source.connect(merger); | |
merger.connect(audioCtx.destination); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Had a problem with dual channel audio playing different parts in the left speaker and the right speaker. I wanted it to play everything in both speakers so I had to hack this together.