MusicLib Documentation

Getting Started!

You will need to add the following link/scripts/styles:

Initialize The Library:

const mlib = new MusicLib()

Library Usage Example:

const albumObj = mlib.createAlbum(...)
mlib.albumPopUp("selector-name", albumObj, ["class"])

Documentation

MusicLib Objects

Album object:

Attributes:

Song object:

Methods - Create Objects

createAlbum:

Description: Create an Album object and return it.
Parameters: Return: Album object

createSong:

Description: Create a Song object and return it.
Parameters: Return: Song object

Methods - MusicLib

makeInfoBox:

Description:
Add an artist info box with an image image_path and bio bio of the artist that pops up when hovering over a chosen element selector.
Usage:
Pass in an object with the attributes:

insertDraggingBox:

Description:
Add dragging box, at selector, where albums albums can be dragged and dropped with the title title and background colour backgroundColor.
Usage:
Pass in these arguments:

insertPlaylist:

Description:
Add playlist interface with title title, an image playlist_img, list of songs songs, and background colour backgroundColor.
Usage:
Pass in these arguments:

albumPopUp:

Description:
Add an album that when hovered over will show a pop up box with its name, artist, genre, year, and tracklist
Usage:
Pass in these arguments: