Giter VIP home page Giter VIP logo

Comments (7)

OJayRobinson avatar OJayRobinson commented on June 23, 2024

Hi Luke,
Thanks for the report. I tossed together a test case using the createjs library and the same loading code, and was unable to replicate the issue in firefox 20 on windows or mac. This makes me suspect the issue is happening somewhere else in the code, and seems to be something that is incorrectly telling Sound to set the active plugin to WebAudioPlugin. This could be manually through code, or the browser could be telling Sound that it supports web audio when it does not. The getCapabilities check looks for window.AudioContext and window.webkitAudioContext, so if either of these exist in your project it will make the web audio check return true when it should not.

For a simple test, you might try setting up the PreloadAndPlay example on your server and changing it to load the same createjs min library you are using. If it works, the problem is in the other code. If it does not work, the problem has something to do with the server. Especially if the example works locally.

Hopefully that helps.

from soundjs.

lukebitts avatar lukebitts commented on June 23, 2024

I'm not touching either of those, and they are both undefined on the javascript console (even locally, though I didn't expect webkitAudioContext to be defined.) My code really is as simple as the example I posted, but I'll try the PreloadAndPlay and see if that works :)

from soundjs.

lannymcnie avatar lannymcnie commented on June 23, 2024

The error you mentioned will happen if there is no active Audio plugin. Firefox requires the HTML or Flash plugin - and the HTML plugin will be activated by default. Either your browser is indicating that it can not load HTML audio, or it thinks the plugins were already registered, but there are no plugins available.

In any place in your app are you registering audio plugins with SoundJS?

from soundjs.

lukebitts avatar lukebitts commented on June 23, 2024

No, I wasn't. Calling the following worked:
createjs.Sound.registerPlugins([createjs.HTMLAudioPlugin]);

Why other browsers work without this line?

And thanks for the help! :)

from soundjs.

lannymcnie avatar lannymcnie commented on June 23, 2024

It seems like the parsing is happening before the built-in plugin registering is happening. A call stack would be really helpful to determine why this is happening. Firebug should be able to give you that.

Also, I recommend using this instead:

createjs.Sound.registerPlugins([createjs.WebAudioPlugin, createjs.HTMLAudioPlugin]);

from soundjs.

lukebitts avatar lukebitts commented on June 23, 2024
TypeError: g is null
anonymous()    create....min.js (line 4505)
dispatchEvent(b=Object { type="complete", target=[PreloadJS XHRLoader]}, g=undefined)    create....min.js (line 70)
_sendComplete()    create....min.js (line 4099)
_handleTagReady()    create....min.js (line 4801)
anonymous()    create....min.js (line 4505)
return a.apply(b, arguments)    create....min.js (line 4505)

The callstack is not very clear to me, but this is it. My createjs is a "beautified" version of the minified one by the way.

And adding the WebAudioPlugin before the HTMLAudioPlugin gives the same error as before.

from soundjs.

lannymcnie avatar lannymcnie commented on June 23, 2024

Ah... Seems to me that WebAudio may be falsely reporting that it works.

from soundjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.