Top Related Projects
:lollipop: Wow, such a beautiful HTML5 music player
:lollipop: Wow, such a lovely HTML5 danmaku video player
高颜值的第三方网易云播放器,支持 Windows / macOS / Linux :electron:
Quick Overview
Meting is a PHP library that provides a unified API for multiple music platforms. It allows developers to easily integrate music streaming functionality from various sources into their applications, supporting platforms like Tencent, NetEase, Xiami, and KuGou.
Pros
- Unified API for multiple music platforms
- Easy integration into existing PHP projects
- Supports caching to improve performance
- Actively maintained and updated
Cons
- Limited to PHP applications
- Dependent on third-party APIs, which may change or become unavailable
- May require additional configuration for certain platforms
- Potential legal concerns regarding music rights and distribution
Code Examples
- Basic usage to search for a song:
<?php
require 'vendor/autoload.php';
use Metowolf\Meting;
$api = new Meting('netease');
$result = $api->format(true)->search('Bohemian Rhapsody');
echo $result;
- Fetching song details:
<?php
$api = new Meting('tencent');
$songId = '0039MnYb0qxYhV';
$result = $api->format(true)->song($songId);
echo $result;
- Getting a playlist:
<?php
$api = new Meting('kugou');
$playlistId = '547134';
$result = $api->format(true)->playlist($playlistId);
echo $result;
Getting Started
- Install Meting using Composer:
composer require metowolf/meting
- Include the library in your PHP file:
<?php
require 'vendor/autoload.php';
use Metowolf\Meting;
// Create a new instance for the desired platform
$api = new Meting('netease');
// Use the API methods
$result = $api->format(true)->search('Your Song Name');
echo $result;
- Configure the API (optional):
$api->cookie('Your cookie');
$api->proxy('http://127.0.0.1:7890');
Competitor Comparisons
:lollipop: Wow, such a beautiful HTML5 music player
Pros of APlayer
- More comprehensive audio player with a full-featured UI
- Supports multiple audio formats including MP3, WAV, and OGG
- Extensive documentation and examples for easy implementation
Cons of APlayer
- Larger file size due to its full-featured nature
- May be overkill for simple audio playback needs
- Less focus on multi-platform music streaming integration
Code Comparison
APlayer:
const ap = new APlayer({
container: document.getElementById('player'),
audio: [{
name: 'Song Name',
artist: 'Artist Name',
url: 'path/to/audio.mp3',
cover: 'path/to/cover.jpg'
}]
});
Meting:
$api = new Meting('netease');
$data = $api->format(true)->search('Song Name');
echo json_encode($data);
Key Differences
- APlayer is primarily a front-end audio player, while Meting focuses on server-side music API integration
- Meting supports multiple music platforms (NetEase, Tencent, etc.), whereas APlayer is platform-agnostic
- APlayer provides a ready-to-use UI, while Meting requires additional front-end implementation
Use Cases
- Choose APlayer for a standalone, feature-rich audio player with minimal setup
- Opt for Meting when integrating multiple music streaming platforms into your application
:lollipop: Wow, such a lovely HTML5 danmaku video player
Pros of DPlayer
- More comprehensive video player with support for multiple formats and streaming protocols
- Extensive customization options and API for developers
- Active development with frequent updates and bug fixes
Cons of DPlayer
- Larger file size and potentially higher resource usage
- Steeper learning curve for basic implementation compared to Meting
Code Comparison
DPlayer:
const dp = new DPlayer({
container: document.getElementById('dplayer'),
video: {
url: 'video.mp4',
type: 'auto'
}
});
Meting:
$api = new Meting('netease');
$data = $api->format(true)->search('Fade', [
'page' => 1,
'limit' => 10
]);
Key Differences
- DPlayer focuses on video playback, while Meting is primarily for audio streaming and music APIs
- DPlayer is JavaScript-based, whereas Meting is PHP-based
- Meting provides a unified API for multiple music platforms, while DPlayer is a standalone video player
Use Cases
- Choose DPlayer for advanced video playback needs with customization options
- Opt for Meting when working with multiple music streaming platforms and requiring a unified API
Both projects serve different purposes and can be complementary in certain scenarios, depending on the specific requirements of your project.
高颜值的第三方网易云播放器,支持 Windows / macOS / Linux :electron:
Pros of YesPlayMusic
- Offers a full-featured music player with a modern, user-friendly interface
- Supports multiple music sources, including NetEase Cloud Music and QQ Music
- Provides a desktop application for Windows, macOS, and Linux
Cons of YesPlayMusic
- Limited to specific music platforms, primarily focused on Chinese services
- Requires more system resources due to its full-featured nature
- May have a steeper learning curve for users unfamiliar with the supported platforms
Code Comparison
Meting (PHP):
$api = new Meting('netease');
$data = $api->format(true)->search('Hello');
YesPlayMusic (JavaScript):
import { neteaseApi } from '@/utils/api';
const result = await neteaseApi.search('Hello');
Summary
Meting is a lightweight PHP API for multiple music platforms, focusing on simplicity and ease of integration. YesPlayMusic, on the other hand, is a full-fledged music player application with a rich user interface, primarily targeting Chinese music services. While Meting offers flexibility for developers to build custom solutions, YesPlayMusic provides a ready-to-use application for end-users. The choice between the two depends on the specific use case and target audience.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
:cake: Wow, such a powerful music API framework
Introduction
A powerful music API framework to accelerate your development
- Elegant - Easy to use, a standardized format for all music platforms.
- Lightweight - A single-file library that's less than 51KB.
- Powerful - Support various music platforms, including Tencent, NetEase, Xiami, KuGou, Baidu, Kuwo and more.
- Free - Under MIT license, need I say more?
Requirement
PHP 5.4+ and BCMath, Curl, OpenSSL extension installed.
Installation
Require this package, with Composer, in the root directory of your project.
$ composer require metowolf/meting
Then you can import the class into your application:
use Metowolf\Meting;
$api = new Meting('netease');
$data = $api->format(true)->search('Soldier');
Note: Meting requires BCMath, cURL and OpenSSL extension in order to work.
Quick Start
require 'vendor/autoload.php';
// require 'Meting.php';
use Metowolf\Meting;
// Initialize to netease API
$api = new Meting('netease');
// Use custom cookie (option)
// $api->cookie('paste your cookie');
// Get data
$data = $api->format(true)->search('Soldier', [
'page' => 1,
'limit' => 50
]);
echo $data;
// [{"id":35847388,"name":"Hello","artist":["Adele"],"album":"Hello","pic_id":"1407374890649284","url_id":35847388,"lyric_id":35847388,"source":"netease"},{"id":33211676,"name":"Hello","artist":["OMFG"],"album":"Hello",...
// Parse link
$data = $api->format(true)->url(35847388);
echo $data;
// {"url":"http:\/\/...","size":4729252,"br":128}
More usage
Join the Discussion
Related Projects
- MoePlayer/Hermit-X
- MoePlayer/APlayer-Typecho
- mengkunsoft/MKOnlineMusicPlayer
- webjyh/WP-Player
- yiyungent/Meting4Net
- injahow/meting-api
- mPlayer2
Author
Meting © metowolf, Released under the MIT License.
Top Related Projects
:lollipop: Wow, such a beautiful HTML5 music player
:lollipop: Wow, such a lovely HTML5 danmaku video player
高颜值的第三方网易云播放器,支持 Windows / macOS / Linux :electron:
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot