The structure of the shortcode

Although the waveplayer shortcode with all its parameters is created automatically when adding a player in your posts, it is useful to understand its structure, especially when you need to add a player programmatically or inside an editor that doesn’t support any of the default insertion methods.

        [ waveplayer ids = "<comma-separated IDs of the selected audio attachments>"
                     url = "<comma-separated list of URLs for remotely hosted audio files"
             music_genre = "all | <comma-separated list of music genres>"
                    size = "lg | md | sm | xs"
                    skin = "w2-legacy | w2-evolution | play_n_wave | thumb_n_wave | w3-standard | w3-exhibition | <custom-skin-folder-name>"
                   style = "light | dark | color-scheme"
                   shape = "square | circle | rounded"
                    info = "none | bar | playlist"
                autoplay = "true | false"
              repeat_all = "true | false"
                 shuffle = "true | false"
              wave_color = "#ddd"
            wave_color_2 = "#666"
          progress_color = "#59f"
        progress_color_2 = "#05a"
           hover_opacity = "0.4"
            cursor_color = "#ee2"
          cursor_color_2 = "#d93"
            cursor_width = "2"
               wave_mode = "4"
               gap_width = "1"
        wave_compression = "2"
          wave_asymmetry = "2" ]
Parameters
idsThis 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.
urlInstead 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_genreStarting 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.
skinDefined the skin that is going to be used for this instance of the player. The possible values are w2-legacy, w2-evolution, play_n_wave, thumb_n_wave, w3-standard, w3-exhibition. Those are the factory skins that come with WavePlayer. If you created your own skin, this value needs to reflect the exact name of the folder containing the custom skin.
sizeDefines 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.
styleCan be set to light, dark or color-scheme and defines the color mode of the player. Both light and dark force the player to be displayed in that style regardless of the visitor’s browser color scheme setting. When this option is set to color-scheme, the player will display in light or dark mode depending on the setting of the visitor’s computer or device. If left blank, the player will use the default style option, according to the corresponding option of Settings –> Waveplayer.
shapeCan 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. Please note that this setting might not be available to every skin. Skins that do not implement this option will simply disregard it.
autoplayIf 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_allIf 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.
shuffleIf 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_opacityDefines 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_widthDefines 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_modeDefines 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_widthIf 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_compressionDefines 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_asymmetryDefines 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.

Powered by BetterDocs

0:00
0:00