定制 acekyd/laravelmp3 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

acekyd/laravelmp3

Composer 安装命令:

composer require acekyd/laravelmp3

包简介

A light weight Laravel package for simple operations with mp3 files

README 文档

README

Laravel Package to help you work with mp3 files easily. Simple yet powerful. Built on the getID3

Install

PHP 5.5+ or HHVM 3.3+, and Composer are required.

Via Composer

$ composer require acekyd/laravelmp3

Another alternative is to simply add the following line to the require block of your composer.json file.

"acekyd/laravelmp3": "1.*"

Then run composer install or composer update to download it and have the autoloader updated.

Add this to your providers array in config/app.php

// Laravel 5.2: config/app.php

'providers' => [
    ...
    Acekyd\LaravelMP3\LaravelMP3ServiceProvider::class,
    ...
];

This package also comes with a facade

// Laravel 5: config/app.php

'aliases' => [
    ...
    'LaravelMP3' => Acekyd\LaravelMP3\LaravelMP3Facade::class,
    ...
]

Usage

Laravel MP3 requires you to pass only one argument which is the filepath. Can be done during or after upload. Use it in your controllers to get the data you might need.

Add it to your controller if needed

	use LaravelMP3;
	$file = $request->file('music');
	$details = LaravelMP3::getBitrate($file); //This returns the bitrate of the music file

Functions

  • getAlbum($path) //This returns the Album name
  • getArtist($path) //This returns the Artist name
  • getBitrate($path) //This returns the bitrate
  • getDuration($path) //This returns the playtime duration of the mp3 e.g 00:03:45
  • getFormat($path) //This returns the file format e.g mp3
  • getGenre($path) //This returns the audio genre
  • getMime($path) //This returns the mime type e.d "audio/mpeg"
  • getTitle($path) //This returns the Title/Name of audio file
  • getTrackNo($path) //This returns the Album track no of an audio file
  • getYear($path) //This returns the Album year of an audio file
  • isLossless($path) //This returns true or false if the audio file is lossless

Credits

License

The GPL License.

统计信息

  • 总下载量: 3.71k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 21
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 21
  • Watchers: 3
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2016-08-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固