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
1
vote
1 answer

Two images playing the same sound when using "onclick" with create.js script?

Coding noob here. I am trying to use two separate audio files on two separate images, so that when I click on picture A, sound 1 plays, and when I click on picture B, sound 2 plays. The problem is, when I click on picture A or B, sound 2 will always…
mdx111
  • 11
  • 1
1
vote
1 answer

How do I import CreateJS into a VueJS .vue component?

I apologize in advance, I'm still very new to Vuejs in general. I'm trying to import CreateJS / SoundJS into a .vue component. I have installed CreateJS via npm. I just don't know how to import the library into the component so I can reference the…
TK421
  • 801
  • 5
  • 16
  • 24
1
vote
1 answer

playback progress of audio - SoundJS

How do I get continual playback progress of an audio file, using SoundJS? I need to animate a graphic matching to play progess. I have looked at the documentation and cannot see a playback progress event.
1
vote
0 answers

Using PreloadJS and SoundJS in React app to preload sounds

I’m trying to use PreloadJS and SoundJS in a React app to preload all sounds and then play from the preloaded cache. I can't figure out how to create the LoadQueue and load the sounds in one component (top level: App.jsx ), and play them in a…
rg_
  • 401
  • 1
  • 4
  • 19
1
vote
0 answers

Sound JS Not running on iOS

I have a player that uses video, photos and sound. If a video is running, SoundJS works fine on iOS. If there is no video, I can't get SoundJS to run at all on iOS (fine everywhere else). I'm trying to play a sound on the onTouch event, and I'm…
beek
  • 3,522
  • 8
  • 33
  • 86
1
vote
2 answers

soundjs play potential memory leak by creating many WebAudioSoundInstance

If I continuously play a sound with soundjs in Chrome, there is an infinite increase of WebAudioSoundInstance count and therefore memory consumption grows. How can one avoid it? createjs.Sound.registerSound("audio/alarm.mp3",…
Rick
  • 1,042
  • 2
  • 14
  • 34
1
vote
1 answer

Completed event not working on sounds played through audiosprite in IE

I am using : createjs.Sound.play("Demo_Sound").on("complete", function () { alert('fin.'); }, this); When Demo_Sound is not in audioSprite but it is a normal sound then it calls the…
Mr_Hmp
  • 2,474
  • 2
  • 35
  • 53
1
vote
1 answer

Add pause function to soundjs

I have tried using: createjs.Sound.pause; mySound.stop(); Nothing works. Right now it have a stop button but if the stop button is pressed then the sound would not be played again. This is the soundjs that im using. soundjs My code is exactly…
C.topo
  • 17
  • 6
1
vote
0 answers

controlling audio speed/play back rate with soundjs

does anyone know how can I change the speed of music by soundjs? createjs.Sound.registerSound("{mp3 address}", "src1"); createjs.Sound.play("src1");
Azadeh Khojandi
  • 3,806
  • 1
  • 30
  • 32
1
vote
1 answer

detect end of song - SoundJS

I am using SoundJS to play music. How can I detect when a song has ended? SoundJS can detect events, is there an event for when a song ends? something like this: var songInstance = createjs.Sound.play("sound"); songInstance.on("_SONG_ENDED_",…
David
  • 382
  • 2
  • 17
1
vote
2 answers

SoundJS - assigning sounds to variables

I am loading several mp3 files using loadManifest, but I am a bit confused by how I'd assign the loaded sounds to variables. Can I use createInstance here? My code currently looks like this: var myRoot = this; var queue = new…
anton980
  • 41
  • 1
  • 9
1
vote
1 answer

Create JS WebAudioPlugin doesn't fallback to HTMLAudioPlugin Facebook Browser Android 4.4

I am currently using the CreateJS suite for audio and various purposes and I am getting an error on the Facebook Browser on Android 4.4 It seems that the WebAudioPlugin isn't supported however it doesn't fallback to HTMLAudio as specified in the…
Danno
  • 26
  • 3
1
vote
1 answer

How to initialise SoundJS for IOS 9

We've been using the CreateJS suite for a while now, but have just realised that our audio is not working on IOS9. Unfortunately we only have one IOS9 test device, running IOS9.2.4, but are getting mixed results with audio playback. The rough…
Baps
  • 103
  • 10
1
vote
1 answer

How can you detect if ANY sounds are currently playing in soundJS?

How can you detect if any sounds are playing in soundJS? I have lots of sounds firing on and off sometimes legitimately over the top of each other. I need a way to find out if any sounds are playing at any given time ie. something…
sonicboy
  • 11
  • 3
1
vote
0 answers

Playing sounds over Hangouts with SoundJS

I want to be able to play a sound via button click and have it 'broadcast' to everyone in my Google Hangout. I don't care about live microphone streams or anything else. Just click a button, play a sound that everyone can hear. Most sounds are…
dijon
  • 359
  • 1
  • 9
  • 21