Skip to content

Commit

Permalink
Fixes #149.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Wilson committed Jun 1, 2015
1 parent 51c537d commit 439c238
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.html
Expand Up @@ -909,13 +909,15 @@ <h3>Requesting Access to the MIDI System with System Exclusive Support</h3>
<h3>Listing Inputs and Outputs</h3>
<p>This example gets the list of the input and output ports and prints their information to the console log, using ES6 for...of notation.
<pre class="code es-code">function listInputsAndOutputs( midiAccess ) {
for (var input in midiAccess.inputs) {
for (var entry of midiAccess.inputs) {
var input = entry[1];
console.log( "Input port [type:'" + input.type + "'] id:'" + input.id +
"' manufacturer:'" + input.manufacturer + "' name:'" + input.name +
"' version:'" + input.version + "'" );
}

for (var output in midiAccess.outputs) {
for (var entry of midiAccess.outputs) {
var output = entry[1];
console.log( "Output port [type:'" + output.type + "'] id:'" + output.id +
"' manufacturer:'" + output.manufacturer + "' name:'" + output.name +
"' version:'" + output.version + "'" );
Expand Down

0 comments on commit 439c238

Please sign in to comment.