Development has moved to WhoopRadioDesktop
Play HTML audio, Youtube, Soundcloud, and Bandcamp with a single javascript library!
MetaMusic is an open source javascript library which enables the playback of various internet music sources through the use of metadata.
None :)
- Modular design
- Plugin support
- Custom event handling
- Flexible data structure
- Standard JSON for metadata
Download the lastest release from the releases tab.
Place the extracted files in the project folder.
Import MetaMusic and any required plugins
import MetaMusic from './MetaMusic/src/meta-music.js';
import HTML from './MetaMusic/src/plugins/HTML/html.js';
Next, enable the plugins
MetaMusic.players = {HTML};
Finally, create the MetaMusic instance
let mm = new MetaMusic();
Then wait for the instance to be ready before calling any methods
await mm.waitForEvent('ready');
//mm is ready to go
Once the instance is ready, all methods can be used. Here is a quick example of loading a track and immediately playing it.
let track = new HTML.Track({src:"https://v.redd.it/6m47mro5xpv51/DASH_audio.mp4",title:"Scott's Factory"});
await mm.waitForEvent('ready');
await mm.load(track);
await mm.play();
Here is the final code.
import MetaMusic from './MetaMusic/src/meta-music.js';
import HTML from './MetaMusic/src/plugins/HTML/html.js';
MetaMusic.players = {HTML};
let mm = new MetaMusic();
let track = new HTML.Track({src:"https://v.redd.it/6m47mro5xpv51/DASH_audio.mp4",title:"Scott's Factory"});
await mm.waitForEvent('ready');
await mm.load(track);
await mm.play();
For advanced functionality, see the examples section