Skip to content

nICEnnnnnnnLee/DanmuMusicPlayer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DanmuMusicPlayer

语言java 支持系统 Win/Linux/Mac 测试版本64位Win10系统, jre 1.8.0_101 开源协议Apache2.0
当前版本 最近更新

弹幕点歌姬

😄功能

监听直播间弹幕,当一定等级的粉丝发送点歌 歌名 singer时,本地自动搜索并播放歌曲

  • 直播间弹幕监听支持情况
Key 是否支持 最后测试时间
bili 2024/03/09
douyu 2024/03/09
  • 音乐源支持情况
Key 是否支持
网易云音乐
QQ音乐

😄使用方法

  • Windows下调用run.bat即可,其它java环境可参考命令行调用
set /p musicSource="请选择音乐源(qq/163):"
set /p danmukuSource="请输入弹幕源(douyu/bili):"
set /p roomId="请输入房间号:"
set /p level="请输入允许点歌的粉丝牌最小等级:"

java -Dfile.encoding=utf-8 -jar DanmuFkMusic.jar %danmukuSource% %roomId% %musicSource% %level%
pause
  • 预览

😄拓展

关于弹幕源
  • 目前支持斗鱼和哔哩哔哩。
    如有需求,实现接口nicelee.function.danmuku.core.IDanmuku,并在类上加上注释即可。
    举例:
@Autoload(source = "弹幕源标识", desc = "弹幕源描述")  
那么Main方法里,将danmuSource替换为播放器标识即可。如下:  
IDanmuku danmu = DanmukuManager.createDanmuku("弹幕源标识", roomId); 

以下为IDanmuku接口:

public interface IDanmuku {
	// 请实现静态实例化create方法
	//public static IDanmuku create(long roomId) 
	
	public boolean start();
	
	public void stop();
	
	public int status();
	
	public List<IMsgHandler> addMsgHandler(IMsgHandler handler);
}
关于音乐源
  • 目前支持网易云和QQ音乐。如有需求,实现接口nicelee.function.music.source.IMusicAPI,并在类上加上注释即可。
    举例:
@Autoload(source = "音乐源标识", desc = "音乐源描述")  
那么Main方法里,将musicSource替换为播放器标识即可。如下:  
IMusicAPI api = MusicManager.createMusicAPI("音乐源标识");  
关于音乐播放器
  • 目前只是实现了一个简单的播放器。
    如有需求,实现接口nicelee.function.music.player.IMusicPlayer,并在类上加上注释即可。
    举例:
@Autoload(source = "播放器标识", desc = "播放器描述")  
那么Main方法里,将ws替换为播放器标识即可。如下:  
IMusicPlayer player = MusicManager.createMusicPlayer("播放器标识");   
关于更复杂的弹幕逻辑处理
  • 新增一个IMsgHandler并注册即可,返回值代表是否继续处理下一个Handler
    举例:
new IMsgHandler() {
    @Override
    public boolean handle(Msg msg, User user) {
        ...
        return true;
    }
} 

😄其它

😄第三方库使用声明

😄LICENSE

Copyright (C) 2019 NiceLee. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

哔哩哔哩/斗鱼 弹幕点歌姬 - 支持QQ音乐/网易云音乐源

Resources

License

Stars

Watchers

Forks

Packages

No packages published