• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Tips and Tricks HQ

  • Home
  • Projects
    • All Projects
    • Simple WP Shopping Cart
    • WP Express Checkout Plugin
    • Accept Stripe Payments
    • WP Download Monitor
    • Easy HTTPS Redirection
    • WP Security and Firewall Plugin
    • WP eStore Plugin
    • WP Affiliate Platform
    • WP eMember
  • Products
    • All Products
    • Checkout
  • Support
    • Support Portal
    • Customer Only Forum
    • WP eStore Documentation
    • WP Affiliate Software Documentation
    • WP eMember Documentation
  • Contact

Compact WordPress Audio/Music Player Plugin (All Browser Compatible)

Home » Blog » Compact WordPress Audio/Music Player Plugin (All Browser Compatible)

Last updated: July 12, 2022





The WordPress Audio Player plugin is a compact HTML5 + flash hybrid  based WordPress plugin which can be used to play an audio file (.mp3 or .ogg). The audio player is compatible with all major browsers and devices (Android, iPhone).

  • If you are selling audio files from your site then you can use this plugin to offer a preview
  • If you do podcasting then this audio player can be used to embed the audio files on WordPress posts or pages
  • The audio player is compact so it doesn’t take a lot of real estate on your webpage
  • HTML5 compatible so the audio files embedded with this plugin will play on iOS devices

Audio Player Plugin Screenshot

The following images show how the audio player looks when it is playing and not playing a music file:

The following is a preview of how the audio player looks when using template 1:



audio-player-template1-preview

When the play button is clicked, the button will change to a pause button allowing users to pause the music playback.

Audio Player Plugin Installation and Usage

  1. Go to the ‘Add New’ plugins screen in your WordPress admin area
  2. Click the ‘upload’ tab
  3. Browse for the plugin file (sc_audio_player.zip)
  4. Click ‘Install Now’ and then activate the plugin
  5. Use the following shortcode to embed an audio file anywhere on your site
[sc_embed_player fileurl="URL-OF-THE-MP3-FILE"]

Example shortcode:

[sc_embed_player fileurl="https://www.example.com/wp-content/uploads/my-music/mysong.mp3"]

Additional Usage Documentation

Using Auto Play Option

Use the “autoplay” parameter in the shortcode to play the audio file on page load. Here is an example shortcode with autoplay option:

[sc_embed_player autoplay=true fileurl="https://www.example.com/wp-content/uploads/my-music/mysong.mp3"]

Specifying a Volume Level

Use the optional “volume” parameter in the shortcode to specify a volume level for the audio. You can use a value between 0 – 100 for the volume level. Here is an example shortcode usage:

[sc_embed_player volume="50" fileurl="https://www.example.com/wp-content/uploads/my-music/mysong.mp3"]

The above will set the volume level of the audio file to 50.

Looping the Sound

Use the “loops” parameter in the audio player shortcode to loop an audio file playback automatically. Here is an example shortcode usage with auto loop:

[sc_embed_player loops="true" fileurl="https://www.example.com/wp-content/uploads/my-music/mysong.mp3"]

Specifying Both MP3 and OGG Files for the Audio

Note: You don’t really need to use this option. You can just use the mp3 option and the plugin will make sure that the file is playable in all devices.

You can specify both the files types in the “fileurl” parameter separating them with a “|” character. Here is an example shortcode usage that is specifying both the .mp3 and .ogg version of the audio file:

[sc_embed_player loops="true" fileurl="https://www.example.com/my-audio.mp3|https://www.example.com/my-audio.ogg"]

The plugin will play the supported file based on the user’s device.

Wrapping Text Around the Audio Player

If you want to wrap some text around the audio player then use the following in the “Text/HTML” view of the post/page editor:

<p style="display: inline">My Audio: </p>[sc_embed_player fileurl="https://www.example.com/my-music/mysong.mp3"]

Alternatively, use the following in the “Text” view of the post/page editor (wrap the audio player shortcode in another CSS class with float):

Some example text
<div style="float: left;">
[sc_embed_player fileurl="https://www.example.com/my-music/mysong.mp3"]
</div>

Audio Player Template 1

A few users have asked us to add a player template that has a seek bar and volume control. Audio player template1 gives you that option:

Use the following shortcode to embed the audio player using template 1:

[sc_embed_player_template1 fileurl="https://www.example.com/wp-content/uploads/my-music/mysong.mp3"]

The above shortcode will produce an output like the following preview:

audio-player-template1-preview

This template1 shortcode supports “autoplay” and “loops” parameters too. Here is an example:

[sc_embed_player_template1 fileurl="https://www.example.com/my-music/mysong.mp3" autoplay="true" loops="true"]

Misc Tips and Tweaks

Remove the White Pixel/Dot on Black Background

If you are using a WordPress theme with black background then you may notice a very small white dot below the audio player. Add the following block of CSS code to your theme’s CSS file to get rid of it:

#sm2-container{
bottom: 0px;
}

Adding the Audio Player to a Theme’s Template File

You can also embed the audio player in your theme’s template file. Here is an example code that you can add to your template file:

<?php echo do_shortcode('[sc_embed_player fileurl="URL OF THE MP3 FILE"]'); ?>

Playing Audio on Your Home Page Only

Here is an example code that you can add to your header.php or footer.php template file and it will autoplay the audio file on your home page only:

<?php 
if(is_front_page()){
    echo do_shortcode('[sc_embed_player fileurl="URL OF THE MP3 FILE" autoplay="true"]'); 
}
?>

Change the Player Background Color for Template 1

Add the following CSS code to your theme’s CSS file or via the custom CSS plugin to change the player background color. The following example will change the color to red.

.mejs-container, .mejs-embed, .mejs-embed body, .mejs-container .mejs-controls {
    background: red !important;
}

Disable Simultaneous Audio File Playback

Go to the settings menu of this plugin and check the “Disable Simultaneous Play” option to turn off simultaneous audio file playback option. When this option is used, it will automatically stop the audio file that is currently playing when the visitor plays a new file.

Autoplay is not Working on IOS Devices

IOS devices (iPhone iPad) do not allow you to do autoplay. This is a functionality that Apple prevents on their devices. Nothing we can do in the plugin for this unfortunately.

Hosting Your Audio Files

The most obvious choice is to upload your audio files to your site using WordPress’s media uploader. After you upload the audio file via media uploader, it will give you the URL of the file. You can then use the URL in the shortcode of this audio player plugin.

Alternatively, you can host your audio files on Amazon s3.

Download The Latest Version

Download Audio Player Version

Plugin Compatibility

Works with the latest version of WordPress.

Plugin Requires

Requires WordPress 4.0 or higher.

Check out our projects page for more cool WordPress plugins.

No related posts.


Wordpress Plugin audio player,  audio player plugin,  WordPress audio player,  WordPress audio player plugin,  WordPress music player

Reader Interactions

Comments (107 responses)

  1. admin says:
    July 22, 2013 at 9:40 pm

    @YCID, The audio player doesn’t need to open a new window. It will play the audio on the same page where you have embedded it. Are you using our audio player shortcode to embed the audio file?

  2. YCID says:
    July 22, 2013 at 5:47 am

    Great audio player, thank you!
    Just one question – is it possible to play the audio without opening another window? I want to keep people on the same page so they can see the images I am describing too.
    Thanks.

  3. admin says:
    June 15, 2013 at 7:21 pm

    @Mike, Glad to hear that you liked the plugin. You can go to this link and rate it (you will probably need to create a free WordPress.org account though)
    http://wordpress.org/support/view/plugin-reviews/compact-wp-audio-player

  4. Mike says:
    June 15, 2013 at 3:15 pm

    I really like your SC Audio plug-in alot! I’ve played with a bunch of different plug-ins from others and I find yours to be the most compatible between different browsers, being able to use a mp3 file in some and ogg files in others really was a pain. Now I have the choice to either or!

    I would love to rate your plug-in on the wp plug-in site but I don’t know how too….what do I need to do or go to be able to rate your plug-In?

  5. admin says:
    June 3, 2013 at 10:38 pm

    @Vorddss, Can you please make sure you are using audio player plugin version 1.5? You can download this version from this page. I haven’t uploaded this version (1.5) to the WordPress repository yet (this version has the audio loop functionality).

  6. Vorddss says:
    June 3, 2013 at 6:10 am

    Hi, Please help me in audio loop function.. I added below php code but its not working with loop:

    <php echo do_shortcode(‘[sc_embed_player autoplay=true volume=”70″ loops=”true” fileurl=”http://dateakademie.de/wp-content/uploads/2013/05/Successful-Business-Venture.mp3″]’); ?>

  7. Vorddss says:
    June 3, 2013 at 6:08 am

    Hi, Please help me in audio loop function..

    I added below php code but its not working with loop..!!

    Please suggest me..!!

  8. wyatt says:
    June 3, 2013 at 12:36 am

    I love the player but every time I add the short code next to some text it pushes the player button to another line rather than inserting it next to the text. Is there anyway to fix this?

  9. admin says:
    May 4, 2013 at 3:20 am

    @D, Check the “Specifying a Volume Level” above to see an example of how the shortcode should look like with volume control parameter.

  10. D says:
    May 4, 2013 at 3:07 am

    Hi thanks, so what would the whole code look like w/the volume parameter added? And the page isn’t live yet (since I need the clips to work for it to make sense) so I don’t have a link…

  11. admin says:
    May 3, 2013 at 7:48 pm

    @D, Have you tried using the volume=”100″ parameter in the shortcode? Can you share a link to the page where you have embedded the audio player?

  12. D says:
    May 3, 2013 at 5:31 am

    Hi, I’m having the same issue as Jerry before me. I download the plugin, record my audio clip and then I have no sound when I preview my post. The URL is OK and plays when I put it in my browser in another window. The player icon is fine and appears in the post as well. Just that nothing plays. Please help!

  13. admin says:
    April 27, 2013 at 10:28 pm

    @JerryC, I would double check the URL of the mp3 file that you are trying to use. If you copy and paste the mp3 file URL in the browser’s address bar, does it work? or does it give you a not found (404) error?

  14. JerryC says:
    April 27, 2013 at 9:45 pm

    I am not a programmer. I am trying to embed sermons in posts on our church Word press site. . I have the MP3 file in the media upload of our site and when I put the url in the code the post looks like it should but the MP3 does not play. I am using the [sc_embed_player as you have it above. any help would be greatly appreciated

  15. admin says:
    April 25, 2013 at 3:31 am

    @Jon, I was actually working on adding a volume option in this plugin. I have just updated it. Download the new version from this page and then check the “Specifying a Volume Level” section to learn how to use it.

  16. Jon says:
    April 24, 2013 at 2:34 pm

    Is there a way to set the audio levels to low. The auto play feature has it playing at whatever the viewers audio level is set at. Can that be set to low as a starting level?

  17. admin says:
    April 7, 2013 at 6:54 pm

    @Dan, open the plugin file then search for the following line of code. Uncomment it and you should be good (you don’t need to add any code yourself):

    //soundManager.stopAll();

  18. Dan says:
    April 7, 2013 at 3:55 pm

    Oups i realise my previous comment wasn’t so clear…

    it’s for stopping one instance to play when you click on an other one…

    this code i found here :

    jQuery(‘.myButton_stop’).css(‘display’, ‘none’);
    jQuery(‘.myButton_play’).css(‘display’, ‘inline’);
    soundManager.pauseAll();

    is javascript, so it won’t work in the sc_audio_player.php ! where can i put it ?

  19. admin says:
    April 5, 2013 at 2:17 am

    @Jerrod, do you have a URL of a webpage where I can go and see this error? It is likely that the webpage has other JavaScript errors that is preventing this plugin’s JS code from working correctly.

  20. Jerrod Long says:
    April 4, 2013 at 11:35 pm

    I am trying to utilize your plugin but it isn’t showing either button and I am getting a “Uncaught ReferenceError: soundManager is not defined”

    I tried deactivating then reactivating the plugin but that didn’t help.

    I am on WP 3.5.1

    Thanks.

  21. Rod says:
    March 30, 2013 at 12:44 am

    I solved it by adding the following in my theme’s template file:

    if(is_front_page()){
    echo do_shortcode('[sc_embed_player autoplay=true fileurl="pathTo.mp3"]');
    }

  22. Rod says:
    March 30, 2013 at 12:03 am

    how can i put this plug in on the left Menu in WordPress just in the Fronta Page, i been trying using the “is_front_page()” call, but then how can i show the play and pause button?
    Thanks

  23. Daryl says:
    March 24, 2013 at 9:04 pm

    Yes Autoplay is here. Many thanks to you.

  24. hkey says:
    March 24, 2013 at 7:09 am

    Hello again,

    with the version 1.3 de autplay function is working fine. Thanks!!

    Regards Henk

  25. admin says:
    March 23, 2013 at 5:46 pm

    @Nile, You can add it to the widget by adding a standard text widget to your sidebar then using the mp3 embed shortcode. You can use this plugin to place a player for as many songs as you want. Use the shortcode for each mp3 file you have.

  26. Nile says:
    March 22, 2013 at 10:57 pm

    Also, if someone wanted to have more than 1 song, could they put more than 1 mp3 file?

  27. Nile says:
    March 22, 2013 at 10:49 pm

    Is there a way to implement this in a widget?

  28. admin says:
    December 17, 2012 at 1:08 am

    @Marilyn, Did you try the following?

    [sc_embed_player fileurl="URL OF THE OGG FILE"]

  29. Marilyn says:
    December 16, 2012 at 11:12 pm

    So, if I want song samples to play on iPads, etc., as well as Mac & PC, what do I use for the short code? I see how I do the mp3 part:

    [sc_embed_player fileurl=”URL OF THE MP3 FILE”]

    but what about the OGG?
    Thanks!

  30. Robbieee says:
    November 28, 2012 at 12:49 pm

    Nice job Shaun 🙂 Your play one at a time code works perfectly on my site. For non-programmers like me, the file to insert the the code below is sc_audio_player.php, not the .js files.

  31. Shaun says:
    November 20, 2012 at 5:04 am

    I’ve figured out how to pause the other tracks on the page when you click play on a track. I added these lines after line 30:

    jQuery('.myButton_stop').css('display', 'none');
    jQuery('.myButton_play').css('display', 'inline');
    soundManager.pauseAll();

  32. Shaun says:
    November 16, 2012 at 6:43 am

    @admin @Robbieee

    Did you sort out the problem of multiple buttons on one page? I’d also like it if one button stopped all the other buttons on the page.

  33. admin says:
    November 6, 2012 at 12:28 am

    @Robbieee, yeah that should be doable. I will look into it.

  34. Robbieee says:
    November 5, 2012 at 1:40 pm

    The audio plugin is good; does exactly what it’s supposed to do. I have one request though… Where you have many play button instances on a page, is there any way to limit playing only one audio file at a time? Eg, a play button is playing already, you hit a second play button and the first one stops/pauses.

  35. Nico says:
    October 21, 2012 at 11:13 am

    I just installed both the light box and this and have just wished I’d not wasted hours faffing with other methods. Both are perfect for what I want so thank you. Nice one!

  36. admin says:
    October 4, 2012 at 12:46 am

    @macalle, it will be easier if you read the URL from your JavaScript code (If you are using JQuery then this should be really easy).

  37. macalle says:
    October 3, 2012 at 11:49 am

    I’d like to pass the “URL OF THE MP3 FILE” into a javascript variable.
    Is it possible?

  38. admin says:
    September 4, 2012 at 7:44 pm

    That’s exactly what it does now. The screenshot in this post is showing how the player looks when it is paused and and when it is playing. It doesn’t mean that the audio player will make two buttons.

  39. Oshi says:
    September 4, 2012 at 11:18 am

    Hi sorry if this has been ask before. I was wondering if is possible just to make only one button, when is click the player button it switch to a pause button and when is click back again it will switch back to play.

  40. admin says:
    August 15, 2012 at 9:03 pm

    The player button is pretty small already (it is 32px only). You should be able to make it smaller by modifying the CSS file. Look in the “css/player.css” file of this plugin.

  41. Mikael says:
    August 15, 2012 at 4:19 pm

    Hi,

    This is exactly the minimalist mp3 player I was looking for, but I was wondering if there is a way to downsize the player? It would be great to be able to adjust the size.

    mc

  42. admin says:
    July 19, 2012 at 7:07 pm

    Your preview file will not be the one that you will be selling. A preview file will be a 10 or 20 seconds of the main music file. Once someone purchase the item, you deliver them the full length file.

  43. Keely says:
    July 19, 2012 at 4:56 pm

    It works nicely .. but … you say .. “If you are selling audio files from your site then you can use this plugin to offer a preview”.

    If you do a view source you can see the actual url to the mp3

  44. admin says:
    July 13, 2012 at 2:07 am

    @Crystal, Maybe our video lightbox plugin will help?
    https://www.tipsandtricks-hq.com/wordpress-video-lightbox-plugin-display-videos-in-a-fancy-lightbox-overlay-2700

  45. Crystal says:
    July 13, 2012 at 1:19 am

    Do you have any plans to make a similar plugin to handle video? I know how to embed html5 video manually, but I’m interested in having the GUI components of the audio and video match each other aesthetically.

  46. admin says:
    July 9, 2012 at 7:40 pm

    Yes, it is our plugin. It is not in the repository yet. We will add it to the WordPress repository at a later time.

  47. Amy says:
    July 9, 2012 at 3:12 pm

    This is great! Is this your own plugin or is this in the repository and you are letting us know?

  48. chillout music says:
    July 1, 2012 at 11:40 am

    Thanks guys!!

    I will integrate this audio player as soon as possible on my site. Greetings from sunny Hamburg!
    LS

  49. Astroboy says:
    June 20, 2012 at 4:30 am

    Wow! Thank you for this awesome wp audio player plugin. This plugin rocks.

  50. Jane says:
    June 19, 2012 at 9:47 am

    Thanks admin for this nice sharing. I actually was looking for a HTML5 compatible WordPress Audio Player plugin.

Newer Comments »

Leave a Reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Featured & Popular Articles

Video Answers to Top WordPress QuestionsWordPress Optimization Tips and Tricks for Better Performance and SpeedEssential WordPress Security Tips - Is Your Blog Protected?WordPress Simple PayPal Shopping Cart PluginTop 15 Search Engine Optimization (SEO) Techniques I Forget to DoList of the Best and Must Use WordPress PluginsHow do I Start a Blog and Make Money Online?Good Domain Name Picking Tips for Your Blog SetupFind Out Which WordPress Web Hosting Company Offers the Cheapest and Reliable Web Hosting Solution

Featured WordPress Plugins

WP Express Checkout Plugin
wordpress estore plugin
wordpress membership plugin
wordpress affiliate plugin

Recent Posts

  • How to Use Browser Developer Tools to Inspect Elements and [...]
  • Accept Donations via PayPal from Your WordPress Site Easil [...]
  • Buy Now Button Graphics for eCommerce Websites [...]
  • Subscription Button Graphics for eCommerce Websites [...]
  • Adding PayPal Payment Buttons to Your WordPress Sidebar Ea [...]

Comment & Socialize

  • @Rob, We have just released ...
    - admin
  • I installed the plugin a co ...
    - Rob
  • @Sebastian, We've released ...
    - admin
  • I've used this plugin on a ...
    - Sebastian Djupsjöbacka
  • @John, this plugin doesn't ...
    - admin

Check out our solutions

View our WordPress plugin collection and start using them on your site.

Our WordPress Solutions

Footer

Company

  • About
  • Privacy Policy
  • Terms and Conditions
  • Affiliate Login

Top WordPress Plugins

  • Simple Shopping Cart
  • PayPal Donations
  • WP Express Checkout
  • WP eStore
  • WP eMember

Blogging Tips

  • How to Start a Blog
  • Selecting a Good Domain
  • Cheap WP Hosting
  • WP Video Tutorials
  • Simple SEO Tips

Search


Keep In Touch

Copyright © 2025 | Tips and Tricks HQ