Music Player for WooCommerce includes the MediaElement.js music player in the pages of the products with audio files associated.
Features of the Music Player for WooCommerce, Dokan, WCFM Marketplace, and MultivendorX:
♪ Integrate a music player into the WooCommerce products, Dokan, WCFM Marketplace, and MultivendorX
♪ Includes an audio player that supports formats: OGA, MP3, WAV, WMA
♪ Supports M3U, M3U8 playlists
♪ Includes multiple skins for the Music Player
♪ Supports all most popular web browsers and mobile devices
♪ Includes a widget to insert a playlist on sidebars
♪ Includes a block to insert the playlists on pages using Gutenberg
♪ Includes a widget to insert the playlists on pages using Elementor
♪ Includes a widget for inserting the playlists on pages with Page Builder by SiteOrigin
♪ Includes a control for inserting the playlists on pages with BeaverBuilder
♪ Includes an element for inserting the playlists on pages with Visual Composer
♪ Includes a module for inserting the playlists on pages with DIVI
Note: for the other editors, insert directly the playlists’ shortcodes.
Music Player for WooCommerce includes the MediaElement.js music player in the pages of the products with audio files associated, and in the store’s pages. It allows the integration with the multivendor stores generated with Dokan, WCFM Marketplace, and MultivendorX. Furthermore, the plugin allows selecting between multiple skins.
MediaElement.js is an music player compatible with all major browsers: Internet Explorer, Firefox, Opera, Safari, Chrome and mobile devices: iPhone, iPad, Android. The music player is developed following the html5 standard. The music player supports the following file formats: MP3, WAV, WMA and OGA.
The basic version of the plugin, available for free from the WordPress Directory, has the features needed to include a music player in the pages of the products and the store.
Premium Features
Supports integration with plugins:
Support post_type like auctions, included by third-party plugins.
And third-party players like:
Global Settings of Music Players
The global settings are accessible through the menu option: “Settings/Music Player for WooCommerce”.
Google Analytics Integration
Setting up the Music Players through the products’ pages
The Music Players are configured from the products pages, the Dokan interface, WCFM Marketplace, and MultivendorX.
Settings Interface
How the Pro version of the Music Player for WooCommerce protect the audio files?
If the “Protect the file” checkbox was ticked in the product’s page, and was entered an integer number through the attribute: “Percent of audio used for protected playbacks”, the plugin will create a truncated copy of the audio files for selling (or the audio files for demo) into the “/wp-content/plugins/wcmp” directory, to be used as demo. The sizes of the audio files for demo are a percentage of the sizes of the original files (the integer number entered in the player’s settings). So, the users cannot access to the original audio files, from the public pages of the products.
Music Player for WooCommerce – Playlist Widget
The widget allows to include a playlist on sidebars, with the downloadable files associated to all products with the music player enabled, or for only some of the products.
The widget settings:
Note: In mobiles devices where the direct action of user is required for playing audios and videos, the plugin cannot start playing dynamically.
Music Player for WooCommerce – [wcmp-playlist] shortcode
The [wcmp-playlist]
shortcode allows to include a playlist on the pages’ contents, with all products, or for some of them.
The shortcode attributes are:
products_ids: define the ids of products to include in the playlist, separated by comma, or the * symbol to include all products:
[wcmp-playlist products_ids="*"]
player_style: select the layout of music players (the playlist displays only the play/pause control):
[wcmp-playlist products_ids="*" player_style="mejs-classic"]
highlight_current_product: if the playlist is included in a product’s page, the corresponding item would be highlighted in the playlist:
[wcmp-playlist products_ids="*" highlight_current_product="1"]
cover: allows to include the featured images in the playlist. The possible values are: 0 or 1, 0 is the value by default
[wcmp-playlist products_ids="*" cover="1"]
continue_playing: if there is a song playing when navigates, the player will continue playing after loading the webpage in the same position:
[wcmp-playlist products_ids="*" continue_playing="1"]
controls: allows to define the controls to be used with the players on playlist. The possible values are: track or all, to include only a play/pause button or all player’s controls respectively.
layout: allows to select the new or original layouts with the values: new or classic (“new” is the value by default):
[wcmp-playlist products_ids="*" layout="classic"]
purchased_products: generates the list of products purchased by the logged user. purchased_products="1"
[wcmp-playlist purchased_products="1" layout="classic"]
Note: In mobiles devices where the direct action of user is required for playing audios and videos, the plugin cannot start playing dynamically.
Hooks (actions and filters)
wcmp_after_players_product_page: action called after the players containers in the products pages.
wcmp_audio_tag: filter called when the audio tag is generated. The callback function receives four parameters: the audio tag, the product’s id, the file’s id, URL to the audio file;
wcmp_file_name: filter called when the file’s name is included with the player. The callback function receives three parameters: the file’s name, the product’s id, and the file’s id;
wcmp_widget_audio_tag: filter called when the audio tag is generated as a widget on sidebars. The callback function receives four parameters: the audio tag, the product’s id, the file’s id, URL to the audio file;
wcmp_widget_file_name: filter called when the file’s name is included with the player as a widget on sidebars. The callback function receives three parameters: the file’s name, the product’s id, and the file’s id;
wcmp_purchased_product: filter called to know if the product was purchased or not. The callback function receives two parameters: false and the product’s id.
wcmp_ffmpeg_time: filter called to determine the duration of truncated copies of the audio files for demos when the FFmpeg application is used to generate them.
Other recommended plugins
To install Music Player for WooCommerce, follow these steps:
Music players in the store's pages
Music player in the products pages
Music player skins
Music player settings
Playlist widget
Inserting the playlist in Gutenberg
Inserting the playlist in Elementor
Inserting the playlist with Page Builder by SiteOrigin
Inserting the playlist BeaverBuilder
Inserting the playlist Visual Composer
A: If you decide to protect the audio files, the plugin creates a truncated version of the file to be used as demo and prevent that the original file be copied by unauthorized users.
A: Verify that the theme used in your website, includes the function wp_footer(); in the template file “footer.php” or the template file “index.php”
A: Go to the plugins section in WordPress, deactivate the free version of Music Player for WooCommerce, and delete it ( Don’t worry, this process don’t modify players configured with the free version of the plugin), and finally install and activate the premium version of plugin.
A: In the pro version of the plugin the files for demo are generated dynamically to prevent the access to the original files.
Each time save the data of a product, the files for demo are deleted and generated again, so, you simply should modify the percentage of the audio file to be used for demo in the product’s page.
Fixes a conflict with some theme styles.
[wcmp-playlist]
for including the products’ featured images in the playlist.[wcmp-playlist]
shortcode, with the possible values: track and all for displaying only the play/pause button or all player’s controls.[wcmp-playlist]
shortcode to include a playlist in the website’s pages.