Questions tagged [soundjs]

A Javascript library that provides a simple API, and powerful features to make working with audio a breeze. Part of the CreateJS suite.

About

The SoundJS library manages the playback of audio on the web. It works via plugins which abstract the actual audio implementation, so playback is possible on any platform without specific knowledge of what mechanisms are necessary to play sounds.

Sample Code

 createjs.Sound.alternateExtensions = ["mp3"];
 createjs.Sound.addEventListener("fileload", createjs.proxy(this.loadHandler, this));
 createjs.Sound.registerSound("path/to/mySound.ogg", "sound");
 function loadHandler(event) {
     // This is fired for each sound that is registered.
     var instance = createjs.Sound.play("sound");  // play using id.  Could also use full sourcepath or event.src.
     instance.addEventListener("complete", createjs.proxy(this.handleComplete, this));
     instance.volume = 0.5;
 }

Resources

Related tags

81 questions
0
votes
1 answer

How/Can SoundJS load sound files loaded by other Preloader(like that of Pixi.loaders.Loader())?

I am currently using Pixi.js and its built in Loader, as I peeked through the code, I notice I can load sounds as well. I am using different loader for Sound which is specifically built-in as well within SoundJS. The problem is, I have to manage…
Neon Warge
  • 1,817
  • 6
  • 29
  • 53
0
votes
1 answer

Preloading audio formats for SoundJS

I am setting up a manifest to load a number of images and an audio file that will be played back using SoundJS. I understand the concept of using createjs.Sound.alternateExtensions to play the supported audio format, but I can't tell if I need to…
0
votes
1 answer

SoundJS doesn't plays after using usual html5 tag audio player

I tested project with latest SoundJS 0.6.1, also with soundjs-NEXT libraries, got the same results. Everything works fine on desktop, I have this issue on Android Chrome, tested on these devices: Sony Xperia T, Asus fonepad 7. Actually I'm using so…
gMirian
  • 651
  • 7
  • 13
0
votes
1 answer

Getting error in using SoundJS

I'm using Flash HTML5Canvas document to publish html files. I want to add audio playback and started using SoundJS but having problems in using it. I used the following code in the file. createjs.Sound.registerPlugins([createjs.WebAudioPlugin,…
0
votes
1 answer

SoundJS -- sounds played via instances not working in IE

I've run into some inconsistent behaviour between browsers with SoundJS, namely that IE11 is stingy about playing from Abstract Sound Instances. The following code works in every other browser I've tested, but not in IE11:
M Harding
  • 3
  • 3
0
votes
1 answer

SoundJS music clips should toggle each other on/off

I have a bunch of sounds on a page, similar to the sound grid example. Some of these tracks are music tracks and I'd like to treat them differently. Most of the sounds can play over each other and that is the intent, however, no music track should…
dijon
  • 359
  • 1
  • 9
  • 21
0
votes
1 answer

Cocoonjs soundjs not playing on ios

We're building an html project using cocoonjs webview+, but soundjs doesn't play when we open our app on ios. Everything works fine on android in webview+, and we've tried mp3, ogg, and m4v sound files with ios. Does anyone have any idea what we…
ricick
  • 5,694
  • 3
  • 25
  • 37
0
votes
2 answers

playing audio with SoundJS in Intel XDK

I'm playing audio in my HTML5 app using: createjs.Sound.play('boom-sound'); I then imported the project to Intel XDK. Now the game is playing smoothly in the emulator but the no sounds are there. I also tested after building the app for android and…
Buntu Linux
  • 492
  • 9
  • 19
0
votes
1 answer

Can you perform an action at 5 seconds into playing a sound file using Sound.js?

I have my sounds created and playing my html5 page ok on all devices. I have some animations that I want to reveal when the audio reaches certain points. maybe at 5, 10 , 25 seconds. Is that possible if so can you provide sample code to call a…
CsharpBeginner
  • 1,753
  • 8
  • 38
  • 68
0
votes
1 answer

persistent and controllable sounds in soundJS

I'm considering using SoundJS for an online sound interface and I'm a bit confused by the the different examples. The simplicity of the Sound Grid example is appealing. Push a button, get a sound. but I'd like to be able to control the volume and…
dijon
  • 359
  • 1
  • 9
  • 21
0
votes
2 answers

Where is the best place to download FlashAudioPlugin.swf when using SoundJS?

The file is required to use the Flash player in SoundJS (see here), but is not included in any of their downloadable builds.
Chris
  • 5,876
  • 3
  • 43
  • 69
0
votes
2 answers

iPad's mobile safari crashing on canvas-based game (easeljs, soundjs, preloadjs)

I've done quite a bit of searching, so please forgive me if this has been asked before (I couldn't seem to find the right phrasing, if this is the case). I have converted a quiz game from Flash to html5 using the createjs suite of libraries, and it…
scud
  • 21
  • 3
0
votes
1 answer

How do I toggle play/pause with SoundJS?

Im using SoundJS to build a psuedo MPC. I have the sound kit buttons programmed the way I want, but I cannot get the loops to work the way I want. I would like the user to click on "loop1" and it plays. If the user clicks "loop1" again, it should…
madebyporter
  • 13
  • 1
  • 7
0
votes
2 answers

PreloadJS cannot find audio

I'm working on hobby project. I'm using createjs. But, of course, I have a problem. Since I update the code to use Preloadjs, the browser can no longer find the audio files. Here is my loading code: function load (canvasToShowProgress) { canvas…
user2810895
  • 1,284
  • 3
  • 19
  • 33
0
votes
1 answer

Audio track looping in Javascript without a delay

I'm currently helping a friend develop a web application in which I need ~6 audio tracks (all using the same time signature) to continuously loop and stay in sync. To give context, it is a typeface-music pairing application where as soon as a…
mondayRain
  • 65
  • 6