The jPlayer Product Sampler plugin for WooCommerce is a music and video player that enables your customers to preview digital music and video files before they buy them. You simply upload a sample file in the backend and jPlayer Product Sampler will take care of the rest. You have full control over positioning the player on the product page through the smart built in hooks WooCommerce offers you. jPlayer Product Sampler also support jPlayer skins, it comes bundled with a few but should find one that’s not there you can simply upload your skin to the skins folder and the plugin will take care of the rest for you. jPlayer Product Sampler support HTML 5 playback as well as Flash, should your preferred playback method not work for a client it will automatically fall back to the other method.
Installation
↑ Back to top- Upload ‘woocommerce-jplayer-product-sampler’ to your ‘plugins’ directory.
- Activate ‘WooCommerce jPlayer Product Sampler’ through the ‘plugins’ menu in your WordPress admin area.
Setup and Configuration
↑ Back to top- Go to: WooCommerce > Settings > Products > JPlayer Product Sampler.
- Playback Solution: This is your preferred playback method to use, should this method not work for your clients it will fall back to the other option.
- jPlayer Skin: The plugin has support for jPlayer skins, it comes bundled with a few, but should you wish to use another skin, you can simply upload a new skin and choose it here.
- Loop: If this option is checked, the player will loop playing the sample.
- Use Shortcode for Player Placement: When enabled you can use the [woo_jplayer] shortcode anywhere on the product page to position your player, please note that this setting overrides the jPlayer Location settings.
- jPlayer Location: By making use of the hooks WooCommerce provides you can literally place the player anywhere on the product page.
- Location Priority: This option combined with the jPlayer Location, gives you even more control over where to place the player. Because we make use of hooks to place the player on the product page we are competing with other data/function for realestate space, playing around with this option can enable you to place the player before or after certain content. A lower number gives you higher priority and will place your content above other with a higher priority then yours.
Uploading Sample Files
↑ Back to topShortcode
↑ Back to topFAQ
↑ Back to top.jp-controls li { margin: 0 !important; }How can I add the player to the archives pages? You can do it pretty easily by adding the following snippet to functions.php in your theme folder:
/** * Adds jPlayer to WooCommerce archives pages */ add_action( 'woocommerce_after_shop_loop_item_title', 'jplayer_on_archives', 11 ); function jplayer_on_archives() { echo do_shortcode( '[woo_jplayer]' ); }