I am trying to play a video on iOS while listening to only one side of the stereo audio.
Code below works fine on desktop Chrome but not on Safari on iPhone5 with 8.3 iOS.
var AudioContext = window.webkitAudioContext;
var audioCtx = new AudioContext();
var splitter = audioCtx.createChannelSplitter(2);
var merger = audioCtx.createChannelMerger(1);
source = audioCtx.createMediaElementSource(video);
source.connect(splitter);
splitter.connect(merger, 0);
merger.connect(audioCtx.destination);
'video' is the reference to the DOM video element.
Any help would be much appreciated
thanks, a lot
Sa'ar
Check what kind of audio context the device uses instead of using
||
. For example: