Skip to content

Commit

Permalink
use only webkit implementation of AudioContext API
Browse files Browse the repository at this point in the history
  • Loading branch information
quentind committed Oct 25, 2013
1 parent 1e56348 commit 59dac03
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions _dev/js/audiosprite.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
/**
* For non iOS device or iOS devices connected to network (we assume there is an internet connection)
*/
if ( ! window.AudioContext && ! window.webkitAudioContext && ( ! iOS || (iOS && window.navigator.onLine === true) ) ) {
if ( /*! window.AudioContext &&*/ ! window.webkitAudioContext && ( ! iOS || (iOS && window.navigator.onLine === true) ) ) {

// Determine supported Audio type
if ( this.audio.canPlayType('audio/ogg; codecs="vorbis"') ) {
Expand Down Expand Up @@ -99,9 +99,9 @@

if ( window.webkitAudioContext ) {
ctx = new webkitAudioContext();
} else if ( window.AudioContext ) {
ctx = new AudioContext();
}
} /*else if ( window.AudioContext ) {
ctx = new AudioContext()
}*/

if ( typeof loadedCallback === 'function' ) {
loadedCallback();
Expand All @@ -124,7 +124,7 @@
* Devices / browsers that support Web Audio API
* -
*/
if ( window.AudioContext || window.webkitAudioContext ) {
if ( /*window.AudioContext ||*/ window.webkitAudioContext ) {

var arrayBuff = Base64Binary.decodeArrayBuffer( window.iOS_sounds[ trackName ] );
self.registry[ trackName ] = {};
Expand Down Expand Up @@ -173,7 +173,7 @@
* Devices / browsers that support Web Audio API
* -
*/
if ( window.AudioContext || window.webkitAudioContext ) {
if ( /*window.AudioContext ||*/ window.webkitAudioContext ) {

var source = ctx.createBufferSource();
var vol = ctx.createGainNode();
Expand Down

0 comments on commit 59dac03

Please sign in to comment.