Skip to content

Commit

Permalink
clean up whitespace in example
Browse files Browse the repository at this point in the history
  • Loading branch information
jergason committed Sep 7, 2014
1 parent 9f10b5d commit 3490475
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions example_simple_exportwav.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ <h1>Recorder.js simple WAV export example</h1>

<button onclick="startRecording(this);">record</button>
<button onclick="stopRecording(this);" disabled>stop</button>

<h2>Recordings</h2>
<ul id="recordingslist"></ul>

<h2>Log</h2>
<pre id="log"></pre>

Expand All @@ -36,10 +36,10 @@ <h2>Log</h2>
function startUserMedia(stream) {
var input = audio_context.createMediaStreamSource(stream);
__log('Media stream created.');

input.connect(audio_context.destination);
__log('Input connected to audio context destination.');

recorder = new Recorder(input);
__log('Recorder initialised.');
}
Expand All @@ -56,10 +56,10 @@ <h2>Log</h2>
button.disabled = true;
button.previousElementSibling.disabled = false;
__log('Stopped recording.');

// create WAV download link using audio data blob
createDownloadLink();

recorder.clear();
}

Expand All @@ -69,7 +69,7 @@ <h2>Log</h2>
var li = document.createElement('li');
var au = document.createElement('audio');
var hf = document.createElement('a');

au.controls = true;
au.src = url;
hf.href = url;
Expand All @@ -87,14 +87,14 @@ <h2>Log</h2>
window.AudioContext = window.AudioContext || window.webkitAudioContext;
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia;
window.URL = window.URL || window.webkitURL;

audio_context = new AudioContext;
__log('Audio context set up.');
__log('navigator.getUserMedia ' + (navigator.getUserMedia ? 'available.' : 'not present!'));
} catch (e) {
alert('No web audio support in this browser!');
}

navigator.getUserMedia({audio: true}, startUserMedia, function(e) {
__log('No live audio input: ' + e);
});
Expand All @@ -103,4 +103,4 @@ <h2>Log</h2>

<script src="recorder.js"></script>
</body>
</html>
</html>

0 comments on commit 3490475

Please sign in to comment.