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
5
votes
1 answer

Register a sound already loaded as a base64 or binary in soundjs library

I have a big problem, I have not found a solution yet for. In short I have a front end web page where a custom API build on the fly audio tracks. All the tracks are temporarily stored in a variable within the browser as base64 strings. My problem…
Giuseppe
  • 307
  • 3
  • 18
4
votes
2 answers

Audio cuts out on webpages

I am working on a website which gives users the option to have the pages read aloud to them. I am using SoundJS (https://www.createjs.com/soundjs) to load in an OGG, MP3, and WAV version of a narration file, and then play it as soon as it finishes…
swinn
  • 869
  • 1
  • 16
  • 46
4
votes
3 answers

Getting SoundJS to work with Cordova/Phonegap

I am building an app with extensive audio requirements, so I am using SoundJS for that, and I am compiling the app using phonegap. I am using the mobile safe approach to build a soundJS app. It seems that there are different audio plugins, including…
hmghaly
  • 1,411
  • 3
  • 29
  • 47
3
votes
2 answers

iOS ringer switch mutes web audio

In a project I'm working on I noticed that, on iOS, the sounds are muted when the ringer switch is turned off. The project is based on CreateJS and the sounds are managed by SoundJS. Frustratingly, other websites that use sounds/media (youtube,…
alebianco
  • 2,475
  • 18
  • 25
3
votes
1 answer

Using createjs-soundjs in react web app

I would like to use https://www.npmjs.com/package/createjs-soundjs to play sounds on a react web app. I installed the package normally with npm install createjs-soundjs and it's showing in the packages list. How should I include this to my project,…
jptiilik
  • 138
  • 1
  • 8
3
votes
1 answer

CreateJS - Issue loading sounds in IE11

I've run across a weird issue with sound file loading in IE11. I have a manifest of about a dozen images and then about 8 sound files. What's happening is versions of IE11 that have even the slightest modifications in the security settings are…
2
votes
1 answer

Latest Chrome Desktop update preventing SoundJS from playing sounds (related to autoplay)

I'm getting this JavaScript warning on the latest version of Chrome Desktop, which now prevents auto-playing of sound without user interaction: http://bgr.com/2018/03/22/google-chrome-autoplay-videos-sound-block/ So I'm getting this error/warning in…
object404
  • 71
  • 6
2
votes
1 answer

Repeating a short sound very fast with CreateJS

Goal I am trying to create a fast ticking sound in a Cordova app using Createjs. The ticking sound speed changes based on user settings. At the moment the timing is erratic Setup I have an mp3 audio file of a single tick sound that is 50ms long. A…
2
votes
1 answer

SoundJS: mix html and web audio

I want to play buffered audio in my game for long music files (sort of streaming). It seems I have to use html audio: Buffered audio in SoundJS However, I still want to use webaudio for sound effects (to avoid delay on mobile browsers, for example).…
sbat
  • 1,453
  • 10
  • 21
2
votes
0 answers

Passing an AudioBuffer to AudioContext Analyser in CreateJS

I have made an audioCtx in JavaScript using the AudioContext() class. I have an analyser made with audioCtx.createAnalyser(). If my audio is an audio tag and I make a source with audioCtx.createMediaElementSource(audio) then pass that to the…
Dan Zen
  • 480
  • 3
  • 10
2
votes
1 answer

Createjs pause timeline sound in Flash CC

Is there anyway to control sound file added to timeline layer like to pause and resume the sound with timeline Or is there anyway to detect what sound is being played in the browser with creatjs Thanks
2
votes
0 answers

Path don't work with soundjs + CordovaAudioPlugin

I use soundJS that works great, but when register the CordovaAudioPlugin I have problems with the path and/or safety! :( Paths Web / Ripple - disable the plugin to work Android - "file:///android_asset/www/" then work fine IOS - try…
p3c
  • 133
  • 7
2
votes
1 answer

createjs SoundJS plays mono sound instead of stereo

I use createjs.Sound to play short sound for my project. I wasn't able to use .mp3 format file and converted it to .ogg format. .ogg is playable, but sound is mono channel (I hear only in one side of headset). When I tried to play same file with VLC…
zur4ik
  • 6,072
  • 9
  • 52
  • 78
2
votes
0 answers

Mobile Safari crashes while loading just one 2mb audio file on iPhone 4s

I've stripped the problem right down to a few lines to isolate it. You can see it at http://radiorice.com/mobile/broken.html The audio file is available in aac and ogg formats. It plays fine in mobile Safari when loaded inside an
Jon Ward
  • 21
  • 2
2
votes
1 answer

How to set position correctly in SoundJS for Firefox, IE

I'm trying to use SoundJS to play sn mp3 file and seek to a specific position. I'm using: instance.setPosition(10000); which works correctly in Google Chrome. But in Mozilla Firefox I hear the sound playing from the correct position, and a second…
Colin Pickard
  • 45,724
  • 13
  • 98
  • 148
1
2 3 4 5 6