Permalink
Browse files

Fix 'audio/mpeg' canPlay checks under 100% HTML5 mode, was incorrectl…

…y returning false due to 'audio/mpeg; codecs="mp3"' working and preventing audio/mpeg from being checked. https://getsatisfaction.com/schillmania/topics/ios_and_type_audio_mpeg_does_not_play
  • Loading branch information...
scottschiller committed Sep 15, 2012
1 parent 4edea31 commit c7ab5e4db3d1bbe97e659f44a970c16b5bfb6574

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -1736,7 +1736,7 @@ function SoundManager(smURL, smID) {
return result;
}
if (m instanceof Array) {
- for (i=0, j=m.length; i<j && !isOK; i++) {
+ for (i=0, j=m.length; i<j; i++) {
if (_s.html5[m[i]] || a.canPlayType(m[i]).match(_s.html5Test)) {
isOK = true;
_s.html5[m[i]] = true;
View
@@ -3826,6 +3826,11 @@ function SoundManager(smURL, smID) {
_testHTML5 = function() {
+ /**
+ * Internal: Iterates over audioFormats, determining support eg. audio/mp3, audio/mpeg and so on
+ * assigns results to html5[] and flash[].
+ */
+
if (!_s.useHTML5Audio || !_s.hasHTML5) {
return false;
}
@@ -3846,7 +3851,7 @@ function SoundManager(smURL, smID) {
if (m instanceof Array) {
// iterate through all mime types, return any successes
- for (i=0, j=m.length; i<j && !isOK; i++) {
+ for (i=0, j=m.length; i<j; i++) {
if (_s.html5[m[i]] || a.canPlayType(m[i]).match(_s.html5Test)) {
isOK = true;
_s.html5[m[i]] = true;

0 comments on commit c7ab5e4

Please sign in to comment.