src/sound/sound.js
function() {
            this.supported = {};
            // Without support, no formats are supported
            if (!Crafty.support.audio) return;
            var audio = this.audioElement(),
                canplay;
            for (var i in this.codecs) {
                canplay = audio.canPlayType(this.codecs[i]);
                if (canplay !== "" && canplay !== "no") {
                    this.supported[i] = true;
                } else {
                    this.supported[i] = false;
                }
            }
        }
function() {
            this.supported = {};
            // Without support, no formats are supported
            if (!Crafty.support.audio) return;
            var audio = this.audioElement(),
                canplay;
            for (var i in this.codecs) {
                canplay = audio.canPlayType(this.codecs[i]);
                if (canplay !== "" && canplay !== "no") {
                    this.supported[i] = true;
                } else {
                    this.supported[i] = false;
                }
            }
        }
function ( ) { this . supported = { } ; // Without support, no formats are supported if ( ! Crafty . support . audio ) return ; var audio = this . audioElement ( ) , canplay ; for ( var i in this . codecs ) { canplay = audio . canPlayType ( this . codecs [ i ] ) ; if ( canplay !== "" && canplay !== "no" ) { this . supported [ i ] = true ; } else { this . supported [ i ] = false ; } } }
Function to setup supported formats
Function to setup supported formats