5 function addAudio(id
, file
) {
6 var audio
= document
.createElement('audio');
10 document
.body
.appendChild(audio
);
13 function getIDFromURL() {
14 var query
= window
.location
.search
;
15 return query
.substring(query
.lastIndexOf("id=") + 3);
18 addAudio('background_audio', 'pink_noise_20s.wav');
19 // Main audio file is identified by an ID passed in the page-set.
20 addAudio(getIDFromURL(), 'pink_noise_140ms.wav');