Skip to content

Commit

Permalink
ticket #153: fixed the test conditions
Browse files Browse the repository at this point in the history
the test on 'probably' in the second loop can safely be removed, since
anyway we will stop at the first one if any of the codec can 'probably'
be played
  • Loading branch information
obiot committed Jan 28, 2013
1 parent 0499c13 commit 1761c0e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/audio/audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,12 @@
}
}
// loop again and check for all the rest ('maybe')
ext = "";
i = 0;
for (; i < len; i++) {
ext = requestedFormat[i].toLowerCase().trim();
// check extension against detected capabilities
if (obj.capabilities[ext] &&
obj.capabilities[ext].canPlay)
obj.capabilities[ext].canPlayType !== 'probably') {
obj.capabilities[ext].canPlay) {
result = ext;
break;
}
Expand Down

0 comments on commit 1761c0e

Please sign in to comment.