1 Star 0 Fork 0

cynthiaterry / mplayer

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

logo

MPlayer音乐播放器

MPlayer V2.0.0贺新春版于2017.01.01正式发布,本次更新要点:

  1. 代码重写,拆分核心功能和特效,只为更好的自定义
  2. 支持HTML结构自定义,只需添加指定class即可
  3. 新增诸多API接口,方便调用
  4. 删除部分无用的配置项
  5. 新增多个回调函数
  6. 新增多个配置项

用法

var player = new MPlayer({
	// 容器选择器名称
	containerSelector: '',
	// 播放列表,格式请参考mplayer-list.js
	songList: [],
	// 专辑图片错误时显示的图片
	defaultImg: '',
	// 自动播放
	autoPlay: false,
	// 播放模式(0->顺序播放,1->单曲循环,2->随机播放,3->列表循环(默认))
	playMode:0,
	// 第一首播放的列表
	playList:0,
	// 第一首播放的歌曲
	playSong:0,
	// 当前歌词距离顶部的距离
	lrcTopPos: 0,
	// 列表模板,用${变量名}$插入模板变量
	listFormat: '',
	// 音量滑块改变事件名称
	volSlideEventName:'',
	// 初始音量
	defaultVolume:0
}, function () {
	// 绑定事件
	this.on('afterInit', function () {
		// 初始化完成
	}).on('beforePlay', function () {
		// 播放前
	}).on('timeUpdate', function () {
	    // 时间变化时
	}).on('end', function () {
		// 播放完毕后
	}).on('mute', function () {
	    // 静音状态改变时
	}).on('changeMode', function () {
		// 播放模式改变时
	});
});

详情请参考文档

截图

screenshot

更新日志

  • V2.0.0 *** * ***
  1. 代码重写,拆分核心功能和特效,只为更好的自定义
  2. 支持HTML结构自定义,只需添加指定class即可
  3. 新增顺序播放模式
  4. 新增诸多API接口,方便调用
  5. 删除部分无用的配置项
  6. 新增多个回调函数
  7. 新增多个配置项
  8. 更多细节请下载体验
  • V1.3.3 *** * ***
  1. 新增大量配置项
  2. 减小CSS文件体积,压缩版仅5KB
  3. 增加静音功能
  • V1.2.3
  1. 重写代码逻辑
  • V1.2.1
  1. 修复一处bug
  • V1.2.0
  1. 增强用户体验
  2. 优化代码
  3. 新增是否自动播放

*** * *** 代表重大更新

感谢

MPlayer播放器完整版使用了以下开源项目

  项目 开源协议
1 jQuery MIT
2 Feather MIT
3 jQuery.nstSlide.js MIT

即将更新

  1. ajax加载歌词
  2. 歌曲播放记忆功能

欢迎发issue提交您想要的功能

赞助

您的赞助让我更有开发的动力 qrcode

Copyright 2016-2017 0936zz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

MPlayer音乐播放器 展开 收起
JavaScript
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/cynthiaterry/mplayer.git
git@gitee.com:cynthiaterry/mplayer.git
cynthiaterry
mplayer
mplayer
master

搜索帮助