支持在线播放音频, 且获取音频文件元数据, 歌手, 封面等信息

This commit is contained in:
zhaojun1998
2019-08-25 23:17:05 +08:00
parent 9416aa0486
commit 4e4cd95431
6 changed files with 178 additions and 81 deletions

View File

@@ -111,4 +111,9 @@ public class FileController {
public ResultBean getImageInfo(String url) throws Exception {
return ResultBean.success(fileService.getImageInfo(url));
}
@GetMapping("/audioInfo")
public ResultBean getAudioInfo(String url) throws Exception {
return ResultBean.success(fileService.getAudioInfo(url));
}
}

View File

@@ -0,0 +1,40 @@
package im.zhaojun.common.model;
public class AudioInfo {
private String title;
private String artist;
private String cover;
private String src;
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getArtist() {
return artist;
}
public void setArtist(String artist) {
this.artist = artist;
}
public String getCover() {
return cover;
}
public void setCover(String cover) {
this.cover = cover;
}
public String getSrc() {
return src;
}
public void setSrc(String src) {
this.src = src;
}
}