var iframeMeter = document.getElementById("iframeCDWALL");


var myAudio1 = iframeMeter.contentWindow.document.getElementById("wallaudio1");
var myMeterElement1 = document.getElementById('meter1');
var audioCtx1 = new window.AudioContext();
var sourceNode1 = audioCtx1.createMediaElementSource(myAudio1);
sourceNode1.connect(audioCtx1.destination);
var meterNode1 = webAudioPeakMeter.createMeterNode(sourceNode1, audioCtx1);
webAudioPeakMeter.createMeter(myMeterElement1, meterNode1, {});
myAudio1.addEventListener('play', function() {
  audioCtx1.resume();
});

var myAudio2 = iframeMeter.contentWindow.document.getElementById("wallaudio2");
var myMeterElement2 = document.getElementById('meter2');
var audioCtx2 = new window.AudioContext();
var sourceNode2 = audioCtx2.createMediaElementSource(myAudio2);
sourceNode2.connect(audioCtx2.destination);
var meterNode2 = webAudioPeakMeter.createMeterNode(sourceNode2, audioCtx2);
webAudioPeakMeter.createMeter(myMeterElement2, meterNode2, {});
myAudio2.addEventListener('play', function() {
  audioCtx2.resume();
});

var myAudio3 = iframeMeter.contentWindow.document.getElementById("wallaudio3");
var myMeterElement3 = document.getElementById('meter3');
var audioCtx3 = new window.AudioContext();
var sourceNode3 = audioCtx3.createMediaElementSource(myAudio3);
sourceNode3.connect(audioCtx3.destination);
var meterNode3 = webAudioPeakMeter.createMeterNode(sourceNode3, audioCtx3);
webAudioPeakMeter.createMeter(myMeterElement3, meterNode3, {});
myAudio3.addEventListener('play', function() {
  audioCtx3.resume();
});

var myAudio4 = iframeMeter.contentWindow.document.getElementById("wallaudio4");
var myMeterElement4 = document.getElementById('meter4');
var audioCtx4 = new window.AudioContext();
var sourceNode4 = audioCtx4.createMediaElementSource(myAudio4);
sourceNode4.connect(audioCtx4.destination);
var meterNode4 = webAudioPeakMeter.createMeterNode(sourceNode4, audioCtx4);
webAudioPeakMeter.createMeter(myMeterElement4, meterNode4, {});
myAudio4.addEventListener('play', function() {
  audioCtx4.resume();
});
