awadh Posted December 1, 2016 Share Posted December 1, 2016 Hi all of you!, Could anybody give me the solution while loading audio in safari browser issue as following. these are the audio files in local drive GET http://localhost/Projects/stacks/bgsound 404 (Not Found) startSoundGET http://localhost/Projects/stacks/startSound 404 (Not Found) normalGET http://localhost/Projects/stacks/normal 404 (Not Found) perfect1GET http://localhost/Projects/stacks/perfect1 404 (Not Found) shrinkGET http://localhost/Projects/stacks/shrink 404 (Not Found) perfect2GET http://localhost/Projects/stacks/perfect2 404 (Not Found) perfect3GET http://localhost/Projects/stacks/perfect3 404 (Not Found) perfect4GET http://localhost/Projects/stacks/perfect4 404 (Not Found) perfect5GET http://localhost/Projects/stacks/perfect5 404 (Not Found) perfect6GET http://localhost/Projects/stacks/perfect6 404 (Not Found) failureGET http://localhost/Projects/stacks/failure 404 (Not Found) pixi.min.js:14Pixi.js 4.0.1 - Canvas - http://www.pixijs.com/ pixi.audio.js:1TypeError: 'undefined' is not a constructor (evaluating 'new window.Audio') Regards, Awadh Quote Link to comment Share on other sites More sharing options...
awadh Posted December 1, 2016 Author Share Posted December 1, 2016 Hi, I forgot to mension that I am using Pixijs frame works Quote Link to comment Share on other sites More sharing options...
awadh Posted December 1, 2016 Author Share Posted December 1, 2016 (edited) var loader = PIXI.loader; loader.add([ {name:"bgsound", url:["audio/bg.mp3","audio/bg.ogg"]}, {name:"startSound", url:["audio/starting2.mp3","audio/starting2.ogg"]}, {name:"normal", url:["audio/woodSound.mp3","audio/woodSound.ogg"]}, {name:"shrink", url:["audio/shrink4.mp3","audio/shrink4.ogg"]}, {name:"perfect1", url:["audio/perfect1.mp3","audio/perfect1.ogg"]}, {name:"perfect2", url:["audio/perfect2.mp3","audio/perfect2.ogg"]}, {name:"perfect3", url:["audio/perfect3.mp3","audio/perfect3.ogg"]}, {name:"perfect4", url:["audio/perfect4.mp3","audio/perfect4.ogg"]}, {name:"perfect5", url:["audio/perfect5.mp3","audio/perfect5.ogg"]}, {name:"perfect6", url:["audio/perfect6.mp3","audio/perfect6.ogg"]}, {name:"failure", url:["audio/failure3.mp3","audio/failure3.ogg"]} ]) .on("progress", loadProgressHandler) .load(setup); function setup(){ //start the game init code } Edited December 1, 2016 by awadh missing detailing Quote Link to comment Share on other sites More sharing options...
awadh Posted December 1, 2016 Author Share Posted December 1, 2016 The issue is only on the safari browser Pixi.js 4.0.1 - Canvas - http://www.pixijs.com/ XMLHttpRequest cannot load http://103.35.164.71/v3/game/high/score/?userid=null&gameid=null. Origin http://localhost is not allowed by Access-Control-Allow-Origin. bgsoundGET http://localhost/Projects/stacks/bgsound 404 (Not Found) startSoundGET http://localhost/Projects/stacks/startSound 404 (Not Found) normalGET http://localhost/Projects/stacks/normal 404 (Not Found) shrinkGET http://localhost/Projects/stacks/shrink 404 (Not Found) perfect1GET http://localhost/Projects/stacks/perfect1 404 (Not Found) perfect2GET http://localhost/Projects/stacks/perfect2 404 (Not Found) perfect3GET http://localhost/Projects/stacks/perfect3 404 (Not Found) perfect4GET http://localhost/Projects/stacks/perfect4 404 (Not Found) perfect5GET http://localhost/Projects/stacks/perfect5 404 (Not Found) perfect6GET http://localhost/Projects/stacks/perfect6 404 (Not Found) failureGET http://localhost/Projects/stacks/failure 404 (Not Found) pixi.audio.js:1TypeError: 'undefined' is not a constructor (evaluating 'new window.Audio') Quote Link to comment Share on other sites More sharing options...
Théo Sabattié Posted December 1, 2016 Share Posted December 1, 2016 Hi'' Do you use safari on window or safari on mac? Safari on window is outdated. Quote Link to comment Share on other sites More sharing options...
awadh Posted December 2, 2016 Author Share Posted December 2, 2016 On 12/1/2016 at 3:05 PM, awadh said: Hi, I forgot to mension that I am using Pixijs frame works hi!!!! I am using safari on window... Quote Link to comment Share on other sites More sharing options...
themoonrat Posted December 2, 2016 Share Posted December 2, 2016 As Théo mentioned, Safari on Windows is outdate - it hasn't been updated in over 4 years, is not supported by Apple, and thus isn't a browser that developers should be worried about testing on. (as a bit of info, to get audio working on Safari for Windows, you had to install the Quicktime plugin. Horrible!) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.