Title: Compact WP Audio Player
Author: mra13 / Team Tips and Tricks HQ
Published: <strong>2013 年 3 月 4 日</strong>
Last modified: 2025 年 12 月 2 日

---

搜索插件

![](https://ps.w.org/compact-wp-audio-player/assets/banner-772x250.jpg?rev=740157)

![](https://ps.w.org/compact-wp-audio-player/assets/icon-128x128.png?rev=994411)

# Compact WP Audio Player

 作者：[mra13 / Team Tips and Tricks HQ](https://profiles.wordpress.org/mra13/)

[下载](https://downloads.wordpress.org/plugin/compact-wp-audio-player.1.9.15.zip)

 * [详情](https://cn.wordpress.org/plugins/compact-wp-audio-player/#description)
 * [评价](https://cn.wordpress.org/plugins/compact-wp-audio-player/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/compact-wp-audio-player/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/compact-wp-audio-player/#developers)

 [支持](https://wordpress.org/support/plugin/compact-wp-audio-player/)

## 描述

Compact WordPress Audio Player plugin is an HTML5 + Flash hybrid based wordpress
plugin which can be used to embed an mp3 audio file on your WordPress post or page
using a shortcode. The audio player is cute and compact and will play on all major
browsers.

This audio player plugin Supports .mp3 and .ogg file formats.

The audio files that you embed using this plugin will work on all devices.

#### 产品特点

 * The audio player is compact so it does not take a lot of real estate on your 
   webpage
 * HTML5 compatible so the audio files embedded with this plugin will play on iOS
   devices
 * Works on all major browsers – IE7, IE8, IE9, Safari, Firefox, Chrome
 * The audio player is responsive.
 * If you do podcasting then this audio player can be used to embed the audio files
   on your WordPress posts or pages
 * If you are selling audio files from your site then you can use this plugin to
   offer a preview
 * Add the audio player to any post/page using shortcode
 * Use autoplay option to play an audio/mp3 file as soon as the page loads
 * Ability to specify both the mp3 and ogg version of your audio files. The plugin
   will play the appropriate one based on the device.

More details can be found on the [Compact Audio Player Plugin Page](https://www.tipsandtricks-hq.com/wordpress-audio-music-player-plugin-4556)

### 用法

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=”http://www.example.com/wp-content/uploads/my-music/mysong.
mp3″]

## 安装

 1. Upload the “sc_audio_player.zip” file via the WordPress’s plugin uploader (Plugins-
    > Add New -> Upload)
 2. Activate the plugin through the “Plugins” menu in WordPress.
 3. Create a page or post to show the player using shortcode.
 4. Add shortcode anywhere in the post/page like: [sc_embed_player fileurl=”mp3 file
    url”]

## 常见问题

### Will my audio file work in all major browsers?

是的

### Can I loop the audio files embedded using this plugin?

是的

### Will the audio player work on iOS devices?

是的

## 评价

![](https://secure.gravatar.com/avatar/6838089f8d2c75dcdfab4a87730d8437f15c7ef799718b905d3e79b2601f43aa?
s=60&d=retro&r=g)

### 󠀁[(Almost) exactly – and I mean exactly – what I was looking for. But…](https://wordpress.org/support/topic/almost-exactly-and-i-mean-exactly-what-i-was-looking-for-but/)󠁿

 [alanpaterson997](https://profiles.wordpress.org/alanpaterson997/) 2025 年 4 月
16 日 5 回复

Really love this plug in! I wanted exactly this – just a single, simple button, 
alternating between play and pause, allowing people to play or not as they saw fit,
linking to an audio file in the back bedroom. And suddenly, there it was! And even
I, a floundering newbie, managed to get it into my (Astra) footer without too much
stumbling around. Result! And then we reach the ‘but’… The music, der, cuts out 
the moment you leave a page. You can restart it when you get to the next page, but
that’s really not ideal, plus you’ll be starting at the very beginning, which isn’t
a very good place to start again, and again, and again, whatever warbling Julie 
Andrews says. Now, if anyone knows how this could be setup to play – or pause – 
site-wide and stay there site-wide regardless of navigation, or of any plug-in with
this one’s simplicity & elegance that could, I’d love to hear about it. Meantime,
like I say, love it! Clean, simple, elegant.

![](https://secure.gravatar.com/avatar/532a23952ea7d20f5623551404058e73f7e05b5ee1ed0198ec5314d237f04270?
s=60&d=retro&r=g)

### 󠀁[Choosing other player images](https://wordpress.org/support/topic/perfect-9967/)󠁿

 [Anonymous User](https://profiles.wordpress.org/anonymized-15287654/) 2024 年 7
月 16 日 1 回复

It does what it promises very well. I have replaced the controls images with custom
ones. Is it possible to get a code snippet to be able to choose between different“
play” images?

![](https://secure.gravatar.com/avatar/d193138be3a70d3ae014dca6c06738d74b5f251c44741eec75ebbd2f09e90efa?
s=60&d=retro&r=g)

### 󠀁[The rarest thing, a simple clean, functional plugin](https://wordpress.org/support/topic/the-rarest-thing-a-simple-clean-functional-plugin/)󠁿

 [alexpcox](https://profiles.wordpress.org/alexpcox/) 2023 年 5 月 3 日 1 回复

Ridiculously simple. Works well. I customised the play/pause images to fit the design
of my website. It plays audio. Job done. Please keep supporting it, it’s great!

![](https://secure.gravatar.com/avatar/50e5c6d494e8ad9f915ed5b20829a5426b8185aa7b9d2014b9c8087494fafc51?
s=60&d=retro&r=g)

### 󠀁[Simple is good](https://wordpress.org/support/topic/simple-is-good-12/)󠁿

 [Senri Miura](https://profiles.wordpress.org/senribb/) 2022 年 8 月 22 日 1 回复

The play button of this plug-in is pasted on the top page. It is better not to take
up extra space with compacts. It’s been working fine so far. If it’s greedy, I think
it would be even better if there were variations in icon design.

![](https://secure.gravatar.com/avatar/1f07b2b4f46d8faea500a30386da8394111e90d6390980210e74be6129e008e4?
s=60&d=retro&r=g)

### 󠀁[Auto-start on page load missing an important option](https://wordpress.org/support/topic/auto-start-on-page-load-missing-an-important-option/)󠁿

 [nsim2021](https://profiles.wordpress.org/nsim2021/) 2022 年 5 月 6 日 1 回复

It’s a cute plugin. It’s been around a long time, nice to see the developer sticking
with it. I installed it years ago in a draft web site I still am working on. I want
a music file to play when someone loads the home page. Therefore, the autoplay option
to play an audio/mp3 file as soon as the page loads is great. However, it never 
stops playing. I have the player in the sidebar so the visitor can see it to shut
it off if they want. However, there is no way to tell the little player to ONLY 
PLAY ONCE. That’s all I need it for. When the visitor arrives at the web site. Unfortunately,
is plays the music on every single page load. I would kindly suggest that you add
a default feature to limit plays to once, on the first page load, regardless of 
how many different pages are loaded. Thanks for thinking about it.

![](https://secure.gravatar.com/avatar/e71df367b804d91087389fec0081accaa820a323344b8d43682e3d5f575c382b?
s=60&d=retro&r=g)

### 󠀁[Doesn’t handle multiple audio on page](https://wordpress.org/support/topic/doesnt-handle-multiple-audio-on-page/)󠁿

 [perrydc](https://profiles.wordpress.org/perrydc/) 2022 年 3 月 8 日 1 回复

I love the compactness, but it needs to kill all audio playing on the page when 
I hit the play button. Otherwise, we have multiple audio playing over each other.

 [ 阅读所有68条评价 ](https://wordpress.org/support/plugin/compact-wp-audio-player/reviews/)

## 贡献者及开发者

「Compact WP Audio Player」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ mra13 / Team Tips and Tricks HQ ](https://profiles.wordpress.org/mra13/)
 *   [ Ruhul ](https://profiles.wordpress.org/tips-and-tricks-hq/)
 *   [ mbrsolution ](https://profiles.wordpress.org/mbrsolution/)

「Compact WP Audio Player」插件已被翻译至 2 种本地化语言。 感谢[所有译者](https://translate.wordpress.org/projects/wp-plugins/compact-wp-audio-player/contributors)
为本插件所做的贡献。

[帮助将「Compact WP Audio Player」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/compact-wp-audio-player)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/compact-wp-audio-player/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/compact-wp-audio-player/)，或通过
[RSS](https://plugins.trac.wordpress.org/log/compact-wp-audio-player/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/compact-wp-audio-player/)。

## 更新日志

#### 1.9.15

 * Using the `wp_safe_remote_get` function instead of `wp_remote_get` to get the
   file headers.

#### 1.9.14

 * Added output escaping to the fileurl shortcode parameter.
 * Refactored the autoplay JavaScript code so output escaping can be added easily.

#### 1.9.13

 * Added a settings option and a filter to disable the URL validation for the fileurl
   parameter.

#### 1.9.12

 * The fileurl field will also accept the relative URL value (example: /wp-content/
   uploades/audio.mp3)

#### 1.9.11

 * Added a fallback for the fileurl verification when the PHP URL validation fail
   for non-latin characters.

#### 1.9.10

 * Added a CSS wrapper class for the audio player to make it work better with block
   themes.
 * Validate URL for the ‘fileurl’ parameter of the shortcode.

#### 1.9.9

 * PHP 8.2 compatibility.

#### 1.9.8

 * Added output escaping to the shortcode parameters. Thanks to WPScan for pointing
   it out.

#### 1.9.7

 * Escape attributes in the shortcode.
 * Added nonce check to the settings menu save operation.
 * Thanks to WPScan team for pointing these out.
 * WP 5.8 compatibility.

#### 1.9.6

 * Updated the audio player for iOS 10 safari.
 * WordPress 4.6 compatible.

#### 1.9.5

 * Bugfix – Audio player embedded with the “autoplay” flag (in the default template)
   wasn’t changing the pause button icon to a play button icon after the audio file
   finished playing.

#### 1.9.4

 * WordPress 4.4 compatibility.

#### 1.9.3

 * Corrected a typo in the play button image file name.
 * changed the uniqid() function to use the “more_entropy” parameter so the value
   is more unique.
 * Fixed a minor bug with internet explorer.

#### 1.9.2

 * Fixed a minor bug (new player template1) with the “loops” parameter.

#### 1.9.1

 * Fixed a minor bug in the new player template1 with the “autoplay” parameter.

1.9 – Added a new shortcode for a different audio player with seek bar and volume
control in the player. The documentation has usage details of this new shortcode.

1.8 – Added the option to specify both an .mp3 and .ogg version of the audio file
in the shortocode.

1.7 – WordPress 3.8 compatibility

1.6 – Added an option to disable simultaneous playback. It will automatically stop
the audio file that is currently playing when a user plays a new file.

1.5 – added a auto loop parameter option in the shortcode to automatically loop 
the audio file

1.4 – added a volume parameter option in the shortcode so you can specify the volume
of the audio

1.3 – Added the autoplay option in the shortcode.

1.2 – added the ability to spcify a container class via the shortcode (helpful for
CSS customization)

1.1 – minor javascript bug fix

## 额外信息

 *  版本 **1.9.15**
 *  最后更新：**6 月前**
 *  活跃安装数量 **20,000+**
 *  WordPress 版本 ** 5.0 或更高版本 **
 *  已测试的最高版本为 **6.9.4**
 *  语言
 * [English (US)](https://wordpress.org/plugins/compact-wp-audio-player/) 、 [Spanish (Chile)](https://cl.wordpress.org/plugins/compact-wp-audio-player/)
   和 [Spanish (Spain)](https://es.wordpress.org/plugins/compact-wp-audio-player/).
 *  [翻译成简体中文](https://translate.wordpress.org/projects/wp-plugins/compact-wp-audio-player)
 * 标签
 * [audio](https://cn.wordpress.org/plugins/tags/audio/)[audio player](https://cn.wordpress.org/plugins/tags/audio-player/)
   [embed](https://cn.wordpress.org/plugins/tags/embed/)[media](https://cn.wordpress.org/plugins/tags/media/)
   [media player](https://cn.wordpress.org/plugins/tags/media-player/)
 *  [高级视图](https://cn.wordpress.org/plugins/compact-wp-audio-player/advanced/)

## 评级

 4.1 星（最高 5 星）。

 *  [  46 条 5 星评价     ](https://wordpress.org/support/plugin/compact-wp-audio-player/reviews/?filter=5)
 *  [  3 条 4 星评价     ](https://wordpress.org/support/plugin/compact-wp-audio-player/reviews/?filter=4)
 *  [  6 条 3 星评价     ](https://wordpress.org/support/plugin/compact-wp-audio-player/reviews/?filter=3)
 *  [  3 条 2 星评价     ](https://wordpress.org/support/plugin/compact-wp-audio-player/reviews/?filter=2)
 *  [  10 条 1 星评价     ](https://wordpress.org/support/plugin/compact-wp-audio-player/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/compact-wp-audio-player/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/compact-wp-audio-player/reviews/)

## 贡献者

 *   [ mra13 / Team Tips and Tricks HQ ](https://profiles.wordpress.org/mra13/)
 *   [ Ruhul ](https://profiles.wordpress.org/tips-and-tricks-hq/)
 *   [ mbrsolution ](https://profiles.wordpress.org/mbrsolution/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/compact-wp-audio-player/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://www.tipsandtricks-hq.com/development-center)