File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ Bug Fixes
9292* Fixed issue where visibility was not being respected in sprite batch (pixi.js 1.5.2 bug fix)
9393* Fixed bug in gl.bindTexture which tried to use an undefined private var. (@photonstorm ) (pixi.js 1.5.2 bug fix)
9494* Fixed the 'short cut' version of Math.floor in setTransform if roundPixels is true. (@photonstorm ) (pixi.js 1.5.2 bug fix)
95+ * SoundManager.boot will check to see if the AudioContext was created before carrying on (thanks @keyle , fix #669 )
9596
9697
9798ToDo
Original file line number Diff line number Diff line change @@ -155,13 +155,24 @@ Phaser.SoundManager.prototype = {
155155
156156 if ( ! ! window [ 'AudioContext' ] )
157157 {
158- this . context = new window [ 'AudioContext' ] ( ) ;
158+ try {
159+ this . context = new window [ 'AudioContext' ] ( ) ;
160+ } catch ( error ) {
161+ this . context = null ;
162+ this . usingWebAudio = false ;
163+ }
159164 }
160165 else if ( ! ! window [ 'webkitAudioContext' ] )
161166 {
162- this . context = new window [ 'webkitAudioContext' ] ( ) ;
167+ try {
168+ this . context = new window [ 'webkitAudioContext' ] ( ) ;
169+ } catch ( error ) {
170+ this . context = null ;
171+ this . usingWebAudio = false ;
172+ }
163173 }
164- else if ( ! ! window [ 'Audio' ] )
174+
175+ if ( ! ! window [ 'Audio' ] && this . context === null )
165176 {
166177 this . usingWebAudio = false ;
167178 this . usingAudioTag = true ;
You can’t perform that action at this time.
0 commit comments