Changelog
2.0.4 (June 9, 2017)
CHANGED
Removed the resuming
state, which wasn't actually being used and was leading to a bug on Android (#679).CHANGED
Any playback initiated before the sound has loaded will now go into the queue to fix various race conditions (#714).FIXED
Correctly initialize an AudioContext with the global mute status (#714).FIXED
AudioContext unlocks on user interaction within a cross-domain iframe on Android Chrome (#756).FIXED
Stopping/pausing a group of sounds now behaves as expected in edge cases (#734).FIXED
Sound ID's now start at 1000 instead of 0 to avoid rate
collisions (#764).FIXED
Prevent unknown mime errors on Internet Explorer when unloading a sound (#720).FIXED
Correctly clean up error event listeners (#720).FIXED
Audio clipping in Internet Explorer when network latency is present with HTML5 Audio (#720).FIXED
Allow passing just an event and ID to turn off listener (#767).FIXED
npm
warning caused by invalid license definition (#763).Changelog
2.0.3 (March 11, 2017)
CHANGED
Unloading a sound no longer fires the end
event (#675).FIXED
Remove setTimeout
wrapper on HTML5 play
call to fix issues on mobile browsers (#694).FIXED
Remove rare possibility of duplicate sound ID's by using global counter (#709).FIXED
Support fades with 2+ decimal places (#696).FIXED
Error in Firefox caused by invalid silent WAV on unload
(#678).FIXED
Check for and warn about missing file extension (#680).FIXED
Regression in Firefox relating to spatial audio (#664).Changelog
2.0.2 (December 4, 2016)
FIXED
Wait to begin playback until AudioContext has resumed (#643).FIXED
Run noAudio
check on initial setup instead of waiting for first Howl
(#619).FIXED
Add play
event to start of queue when autoplay
is used (#659).FIXED
Make sure seek
and duration
are always >= 0 to prevent errors (#682).FIXED
Audio test wouldn't work in IE11 Enhanced Security Mode (#631).FIXED
Ensure AudioContext exists on unload
(#646).FIXED
Always fire pause event even if sound is already paused (#639).Changelog
2.0.1 (October 14, 2016)
ADDED
Support for FLAC audio files.FIXED
Improve fading performance when short fade times are used (#621).FIXED
Correctly handle fades from 0 to 0 volume (#575).FIXED
Prevent a load error from blocking all future playback (#613).FIXED
Reset noAudio
to false
when a sound is unloaded (#617).FIXED
Stop a sound even if it is not playing (#595).FIXED
Emit stop
event before returning from stop
(#616).FIXED
Improve codec checks by removing x-
prefix (#576).FIXED
Set correct loop start/end when calling loop
on a sprite (#604).Changelog
2.0.0 (July 19, 2016)
This major release contains just a few breaking changes outlined below. Howler.js has been rewritten from the ground up using the knowledge and work since the initial release. There's a long list of additions and improvements, which I urge you to read through as the library has evolved quite a bit over this time.
The biggest change is how you should think about your audio when using howler.js. There is now the concept of global (Howler
), group (Howl
) and single sound (Sound
). Each sound that is played gets its own Sound
object that can be manipulated, giving much greater control over playback, whether using sprites or not. Howl
method calls can then apply to one sound or all in the group.
Howler (global) ->
Howl (group) ->
Sound (single)
Howler.js now also has the concept of plugins. The core represents 100% compatibility across hTML5 Audio and Web Audio, adhering to the initial goals of the library. There is also a new Spatial Plugin that adds 3D and stereo audio support only available in the Web Audio API.
Read more about the update in this blog post.
buffer
option is now named html5
. Use this to force HTML5 Audio usage.urls
option is now named src
to specify the audio file(s) to play.pos
method has been renamed to seek
.// Change the seek position of a sound (in seconds).
sound.seek(10);
mute
and unmute
have been consolidated into mute
.// Mute a sound (or all sounds).
sound.mute(true);
Howler.mute(true);
// Unmute a sound (or all sounds).
sound.mute(false);
Howler.mute(false);
play
method no longer takes a callback and immediately returns the playback sound id (this means you can no longer chain onto the play
method, but all others work the same).// Get sound id for a specific playback.
var id = sound.play();
// Pause this playback.
sound.pause(id);
fadeIn
and fadeOut
methods have been removed in favor of the single fade
method.// Fade in a sound.
sound.fade(0, 1, 1000);
// Fade out the sound once the previous fade has ended.
sound.once('fade', function(){
sound.fade(1, 0, 1000);
});
once
method to setup event listeners that will automatically remove themselves once fired.playing
method that will return true
if the specified sound is currently playing.duration
method that will return the duration of the audio source.state
method that will return the loaded state of the Howl.preload
option to allow disabling the auto-preload functionality.fade
, stop
, mute
, volume
, rate
, seek
.rate
method that allows changing playback rate at runtime.unload
method that unloads all active Howls and resets the AudioContext
to clear memory.pool
option to allow setting the inactive sound pool size (for advanced use, still defaults to 5).Howler
listener methods stereo
, pos
and orientation
.Howl
methods stereo
, pos
, orientation
and pannerAttr
to control stereo and spatial audio of single sounds or groups of sounds.pannerAttr
allows for control of coneInnerAngle
, coneOUterAngle
, coneOuterGain
, distanceModel
, maxDistance
, panningModel
, refDistance
and rolloffFactor
.on
, once
and off
to allow listening or removing events for only a specific sound id.Howl
group when no id
is passed: pause
, stop
, volume
, fade
, mute
, loop
, rate
.ext
option and made it especially usefully for playing streams (for example, SoundCloud).fade
method now uses native Web Audio fading when in that mode.rate
option now changes the playback rate on both Web Audio and HTML5 Audio.end
event correctly fires at the end of each loop when using Web Audio.end
event now fires at the correct time.unload
method.pause
on a sound that hasn't yet loaded now works correctly.Howl
is setup so that background audio on mobile devices behaves as expected.