外掛說明
YGZ Music Widget is a powerful WordPress music player widget based on the open-source projects APlayer and MetingJS.
Main Features
- Support for multiple music platforms: NetEase Cloud Music, QQ Music, Kugou Music, Xiami Music, Baidu Music
- Support for various types: single song, playlist, album, artist, search
- Rich player configuration options: volume, loop mode, play order, lyric display, etc.
- Beautiful interface design with customizable theme colors
- Support for fixed-bottom mode and mini mode
- Support for lyric display
- Responsive design, adapting to various devices
- Fully localized, no external CDN dependencies
- Compliant with WordPress coding standards
How to Use
- Install and activate the plugin in the WordPress admin dashboard
- Go to “Appearance” -> “Widgets”
- Find the “YGZ Music Widget” widget
- Drag it to the sidebar or other widget areas
- Configure the player parameters:
- Title: The display title of the widget
- Music Platform: Select the music source (NetEase Cloud Music, QQ Music, etc.)
- Type: Select the content type to play (single song, playlist, album, etc.)
- ID: Enter the ID of the song/playlist/album (can be found in the URL of the music platform page)
- Volume: Set the default volume (between 0-1)
- Theme Color: Customize the player theme color
- Loop Mode: Select all loop, single loop, or no loop
- Play Order: Select list order or random play
- Preload: Set the audio preload method
- Lyric Type: Choose whether to display lyrics
- List Max Height: Set the maximum height of the playlist
- Autoplay: Check to autoplay when the page loads (may be blocked by browsers)
- List Folded: Check to fold the playlist by default
- Fixed Mode: Check to fix the player at the bottom of the page
- Mini Mode: Check to display the mini player
- Mutex: Check to pause other players when this player plays
How to Get Playlist ID
- Open the playlist page in your browser
- Check the URL, for example: https://music.163.com/#/discover/toplist?id=3778678
- The number part in the URL (3778678) is the playlist ID
Credits
- APlayer – Clean, beautiful, and powerful HTML5 music player
- MetingJS – Extension for APlayer, supporting major music platforms
License
This plugin is open-source under the MIT License.
External Services
This plugin uses the following external service:
- Meting API – Used by MetingJS to fetch music data from various music platforms
- URL: https://api.i-meto.com/meting/api
- Purpose: Retrieves music information, including song details, playlists, and lyrics
- Data sent: Music platform, type of content, and ID when a player is initialized
- Terms of Service: https://github.com/metowolf/MetingJS
- Privacy Policy: https://api.i-meto.com/privacy
安裝方式
- Upload the
ygz-music-widgetfolder to the/wp-content/plugins/directory - Activate the plugin through the “Plugins” menu in WordPress
- Go to “Appearance” -> “Widgets”, add “YGZ Music Widget” to your sidebar
- Configure the player parameters and save
常見問題集
-
Why isn’t autoplay working?
-
Modern browsers typically block audio autoplay to improve user experience. This is a browser security policy, not an issue with the plugin.
-
Which music platforms are supported?
-
Currently supported: NetEase Cloud Music, QQ Music, Kugou Music, Xiami Music, Baidu Music.
-
How to change the player theme color?
-
Find the “Theme Color” option in the widget settings, click the color picker to select your favorite color.
-
Can I place multiple players on the page?
-
Yes, but it is recommended to enable the “Mutex” option so that when one player plays, other players will automatically pause.
-
Does the plugin require external CDN dependencies?
-
No! The plugin has integrated all necessary resource files (APlayer.min.css, APlayer.min.js, Meting.min.js) into the plugin, running completely locally without any external CDN dependencies, ensuring stability and reliability.
-
Which WordPress versions are compatible with the plugin?
-
The plugin is compatible with WordPress 5.0 and above, tested up to WordPress 6.9. Requires PHP 7.0 or higher.
使用者評論
這個外掛目前沒有任何使用者評論。
參與者及開發者
變更記錄
1.0.0
- Initial release
- Support for multiple music platforms (NetEase Cloud Music, QQ Music, Kugou Music, Xiami Music, Baidu Music)
- Complete widget configuration options
- Support for lyric display
- Support for fixed-bottom mode and mini mode
- Support for theme color customization
- Responsive design
- Fully localized, no external CDN dependencies
- Compliant with WordPress coding standards
- Added data validation and security checks
- Added front-end resource loading optimization