A reference player demo is included with mumbl but if you dont want to download it, there is also an online demo. The demo player requires jQuery 1.5, but if you only need to use mumbl.js base you do not need jQuery.
Please note that mumbl is not the player in the demo. mumbl is the back-end and the demo is just an example of using mumbl.
Example mumble-Powered Sites
- Firefox 3.5+
- Google Chrome 4+
- SoundManager 2 (version 2.95b.20100323+)
- Firefox 1.5+
- Opera 10+
- Google Chrome 1+
- Songbird 1.4+
Strong and emphasized text has titles (which can be viewed by hovering your cursor over them) containing their type if they are not functions or return type if they are.
TrackItem* to the playlist.
TrackItemListto the playlist.
- Clears the playlist.
- Creates an event dispatcher for the specified event. Custom events cannot be observed until at least one event dispatcher for the event has been created.
window.mumblwill be deleted.
- Returns the duration in seconds of the currently selected track.
- Returns the amount of tracks in the playlist.
trueif the player is muted or
falseif the player is not muted.
true, the player is muted if not already muted.
false, the player is unmuted if not already unmuted.
observer, passing it the event type as the first argument, whenever the specified event is dispatched.
Returns the current
0, looping is turned off.
1, the currently selected track is looped.
2, the playlist is looped. This is the default
- Selects the next track in the playlist from the currently selected track.
mumbl.onready(callback [, scope])
After mumbl is ready to be used, the callback is called using the scope specified or
mumblobject if no scope is specified.
- Plays the currently selected track at its current position.
- Pauses playback of the currently selected track.
trueif player is currently paused. Otherwise, returns
trueif player is currently playing. Otherwise, returns
trueif the player being used is the player of
playerName. Otherwise, returns
Returns the player ID of the player of `playerName` (case-insensitive).
If no such player already exists, it is added to
mumbl.playersand the player ID of the newly added player is returned.
- Returns the current seek position, in seconds, of the currently selected track.
The currently selected track will seek to
newPosition, in seconds.
- Selects the previous track in the playlist from the currently selected track.
- Returns the shuffle state of the playlist.
true, the playlist is played in a random order.
false, the playlist is played in the order that it was created.
- Stops playback if playing and resets the position of the currently selected track.
trueif player is currently stopped. Otherwise, returns
- Returns the index (zero-based) of the currently selected track in the playlist.
The track in the playlist with the index (zero-based) of
- Returns the
TrackItemListrepresenting the playlist.
- Toggles the playing state of the player from paused to playing or playing to paused.
- This removes a previously assigned event observer.
- Returns the player volume from zero to one.
The player volume (zero to one) is set to
An array with five items representing the version of the mumbl library being used.
The string representation of this array matches the regular expression,
- An object populated with constants representing various players:
- The player from
mumbl.playersused to play audio.
- A boolean value that represents if there is a native interface being used for the player.
- The interface to the player being used.
Events can be subscribed to and unsubscribed from with
mumbl.unobserve(). External events are events resulting from direct interaction
with a native interface for a player (like Songbird).
- This is dispatched when a track is selected.
This is dispatched when
This is dispatched when
- This is dispatched when enough data from the currently selected track is loaded that it can play.
- This is dispatched when the rate at which the data from the selected track is loading fast enough to play through the whole track.
- This is dispatched when all of the data for the selected track has been loaded.
- This is dispatched when the playing state of the player is changed externally.
- This is dispatched when the volume of the player is changed externally.
- This is dispatched when the player is muted or unmuted externally.
- This is dispatched when the player's looping state is externally changed.
- This is dispatched when the player's shuffling state is externally changed.
Note: There is no
ready event which can be subscribed to with
mumbl.onready() subscription method should be used instead.
* A TrackItemList is an array of TrackItems. A TrackItem is a list that follows the
following format. When a TrackItem or a TrackItemList is specified as the only
argument for a function, pass every array indice as a separate argument. e.g.,
someFunction(TrackItem) would be called as
someFunction(URI-1, media-type-1, ... URI-N, media-type-N)
someFunction(TrackItemList) would be called as
someFunction(TrackItem-1, ... TrackItem-N).
The choices are in order of preference. If you do not know the media type of an audio
file, just pass
null in place of the media type.
[ choice-1-URI, choice-1-media-type, choice-2-URI, choice-2-media-type, ... choice-N-URI, choice-N-media-type ]
- Use SM2 fallback when HTML5 is supported but none of the media types provided to mumbl are supported.
- Better error handling.
- A while after version 0.1 is released
- Create a simple library that makes all MP3, OGG, WAV, etc. links be able to be played using mumbl.
- Make the demo mumbl-powered music player (it might be renamed "mumblr") portable and reusable.
- Remove jQuery dependency from mumblr.
- Make the track title display scroll (maybe using a <marquee>) when it overflows.
- Version 0.2
- Full compatability with every major browser.
- The distant future (maybe version 1.0)
- Create a simplified flash audio back-end for mumbl that integrates much more nicely and has a smaller file size than SoundManager2.