Shortcode

Although the waveplayer shortcode with all its parameters is created automatically when inserting the Waveplayer through the Add Media frame, it is useful to understand its structure that is composed as follows:

Buy it now, only on
Parameters
ids
This is the only required parameter and it gets automatically populated with the IDs of the tracks selected in the Add Media frame. If left blank together with the following parameter url, this instance of the WavePlayer will be hidden.
url
Instead of the ids parameter, you can provide a URL to an audio file through this parameter. If the file is on the local server, WavePlayer will access the ID3 tags information and show them in the info bar of the player. If the file is on a remote server, WavePlayer will create a local copy of the ID3 tags for a faster future access.
music_genre
Starting from version 1.3.0, WavePlayer registers a custom music_genre taxonomy for the attachments. After creating your desired music genres and associating them to your audio attachments, you can create an instance of WavePlayer specifying which music genre you want it to load. Every time a page containing that instance loads, WavePlayer will include in it all the audio attachments pertaining to the listed music genres. This is the best way to have an instance automatically updated with any new uploaded audio file, because you are not creating an instance with a static list of audio files.
Furthermore, using the wildcard all in the music_genre parameter, you are going to have an instance of WavePlayer that will load all the audio attachments you have ever uploaded to your server.
Please also note that the use of this parameter is not yet integrated in the Media Manager. This means that you have to type the shortcode manually in the post editor.
size
Defines the size of the player. Accepted values are: lg, md, sm and xs. If left blank, the player will be displayed at the default size setting, according to the corresponding option of Settings –> Waveplayer.
style
Can be set to light or dark and defines the coloring of the area where the information of the current track are displayed. Furthermore, Waveplayer is fully customizable through the Custom CSS option of Settings –> Waveplayer. If left blank, the player will use the default style setting, according to the corresponding option of Settings –> Waveplayer.
shape
Can be set to square, circle or rounded and defines the shape of the thumbnail where the playback controls are located. If left blank, the player will use the default shape setting, according to the corresponding option of Settings –> Waveplayer.
autoplay
If set to true, the player will start to playback the track as soon as the page completes loading. If set to false, the user will have to start the playback manually. If left blank, the player will use the default autoplay setting, according to the corresponding option of Settings –> Waveplayer.
repeat_all
If set to true, the player will keep playing back the tracks continuously, restarting from the first track when the last one has ended. If set to false, the playback will stop after the last track has ended. If left blank, the player will use the default repeat_all setting, according to the corresponding option of Settings –> Waveplayer.
shuffle
If set to true, the player will shuffle the tracks every time the visitor reloads the page. If set to false, the order of the tracks will be the one provided with the ids parameter. If left blank, the player will use the default shuffle setting, according to the corresponding option of Settings –> Waveplayer.
wave_color
wave_color_2
Defines the starting and ending color of the vertical gradient filling the waveform. If left blank, the player will use the default wave_color and wave_color_2 settings, according to the corresponding option of Settings –> Waveplayer. For a better understanding of the waveform coloring scheme, please refer to the Waveform Options section of the Settings.
progress_color
progress_color_2
Defines the starting and ending color of the vertical gradient filling the performed portion of the waveform. If left blank, the player will use the default progress_color and progress_color_2 settings, according to the corresponding option of Settings –> Waveplayer. For a better understanding of the waveform coloring scheme, please refer to the Waveform Options section of the Settings.
hover_opacity
Defines the opacity of the wave overlay when the user moves the pointer over the wave. Set this parameter to 0 to have a regular continuous waveform. If left blank, the player will use the default hover_opacity setting, according to the corresponding option of Settings –> Waveplayer.
cursor_color
cursor_color_2
Defines the starting and ending colors of a vertical gradient for the cursor scrolling over the waveform. If left blank, the player will use the default cursor_color and cursor_color_2 settings, according to the corresponding option of Settings –> Waveplayer. For a better understanding of the waveform coloring scheme, please refer to the Waveform Options section of the Settings.
cursor_width
Defines the width of the bars displaying the waveform. Set this parameter to 0 to have a regular continuous waveform. If left blank, the player will use the default cursor_width setting, according to the corresponding option of Settings –> Waveplayer.
wave_mode
Defines the visualization mode of the wave. If set to 0 (‘Continuous’ in the settings page), the waveform will be displayed as a regular continuous waveform. Any other setting from 1 to 10 represents the width a the bars used to display the waveform in a histogram fashion. If left blank, the player will use the default wave_mode setting, according to the corresponding option of Settings –> Waveplayer.
gap_width
If wave_mode is set to any value other than 0 (‘Continuous’), this parameter defines the width of the gap between the bars representing the waveform. If left blank, the player will use the default gap_width setting, according to the corresponding option of Settings –> Waveplayer.
wave_compression
Defines the compression of the wave. This option does not affect the file of the audio, but only the way its waveform gets displayed. A lower level of compression shows a more evident difference between low intensity and high intensity in the waveform. Conversely, a higher level of compression flattens those differences, showing a more uniform wave. If left blank, the player will use the default wave_compression setting, according to the corresponding option of Settings –> Waveplayer.
wave_asymmetry
Defines the ratio between the height of the top half of the wave and the height of the bottom part of the waves. If left blank, the player will use the default wave_asymmetry setting, according to the corresponding option of Settings –> Waveplayer.