November 2019
Beginner
436 pages
8h 52m
English
In the previous section, we prepared a folder structure and obtained some files to use within our application. Now, let's learn how to initialize a music player component and play the sound files we have.
At this point, your project structure should look similar to the following:

Switch to the player.js file and configure a new instance of the player component by calling the Amplitude.init method with an object of configuration settings, as shown in the following code:
Amplitude.init({ songs: [ { name: 'Equilibrium I (Cello version)', artist: 'David Hilowitz', album: 'Equilibrium I (Cello version)', url: './music/David_Hilowitz_-_Equilibrium_I_Cello_version.mp3', ...Read now
Unlock full access