Giter VIP home page Giter VIP logo

Comments (5)

OJayRobinson avatar OJayRobinson commented on September 25, 2024

You are correct, this is not browser related. The creatjs.SoundJS.stop() function is a global stop that accepts no parameters and stops all sound instances. If you want to stop a single instance, you need to do something like this:

      var mySoundInstance = createjs.SoundJS.play(1);
      mySoundInstance.stop();

You can get the latest and greatest version of SoundJS from github.

from soundjs.

grisevg avatar grisevg commented on September 25, 2024

createjs.SoundJS.stop();

doesn't stop it either.

from soundjs.

OJayRobinson avatar OJayRobinson commented on September 25, 2024

interesting, the problem was actually that we were assuming the passed in value for id was a string. We've made an update to that to force it to a string if it isn't one. In the meantime, if you call it like this instead

var mySoundInstance = createjs.SoundJS.play("1");
createjs.SoundJS.stop();

Note, if you update to the latest and greatest, that SoundJS has been renamed to Sound. So the above would look like this:

var mySoundInstance = createjs.Sound.play("1");
createjs.Sound.stop();

Hope that helps.

from soundjs.

grisevg avatar grisevg commented on September 25, 2024

Sorry, but that doesn't help

Still same issue, if you start sound twice (all fine if you do it once)

createjs.SoundJS.play("1");
createjs.SoundJS.play("1");

There won't be a way to stop or mute it:

createjs.SoundJS.stop();
createjs.SoundJS.setMute(true);

If it fixed in NEXT could you please point to a commit

from soundjs.

OJayRobinson avatar OJayRobinson commented on September 25, 2024

Yes, this is fixed in the NEXT version which is our 0.4.0 candidate, and is available on https://github.com/CreateJS/SoundJS/.

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.