File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -909,13 +909,15 @@ <h3>Requesting Access to the MIDI System with System Exclusive Support</h3>
909
909
< h3 > Listing Inputs and Outputs</ h3 >
910
910
< 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.
911
911
< pre class ="code es-code "> function listInputsAndOutputs( midiAccess ) {
912
- for (var input in midiAccess.inputs) {
912
+ for (var entry of midiAccess.inputs) {
913
+ var input = entry[1];
913
914
console.log( "Input port [type:'" + input.type + "'] id:'" + input.id +
914
915
"' manufacturer:'" + input.manufacturer + "' name:'" + input.name +
915
916
"' version:'" + input.version + "'" );
916
917
}
917
918
918
- for (var output in midiAccess.outputs) {
919
+ for (var entry of midiAccess.outputs) {
920
+ var output = entry[1];
919
921
console.log( "Output port [type:'" + output.type + "'] id:'" + output.id +
920
922
"' manufacturer:'" + output.manufacturer + "' name:'" + output.name +
921
923
"' version:'" + output.version + "'" );
You can’t perform that action at this time.
0 commit comments