Fetch the repository succeeded.
官网的音乐播放器demo实现之后为什么是视频播放器的样式?不是这种样式呢?
<script lang="ts" setup>
import { onMounted } from 'vue'
import Player from 'xgplayer'
// @ts-ignore
import MusicPreset from 'xgplayer-music'
import 'xgplayer-music/dist/index.min.css'
onMounted(() => {
const player = new Player({
id: 'vs',
url: 'http://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/xgplayer_doc_video/music/audio.mp3',
poster: 'http://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/xgplayer_doc_video/music/audio.mp3',
title: '林宥嘉·脆弱一分钟',
mediaType: 'audio',
preset: [MusicPreset],
ignores: ['playbackrate'],
marginControls: true,
videoConfig: {
crossOrigin: "anonymous"
},
/***以上配置音乐播放器一定要有ended***/
music: {
// 音乐循环播放列表,如果不需要循环播放可以没有
list: [{
src: 'http://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/xgplayer_doc_video/music/audio.mp3',
title: '林宥嘉·脆弱一分钟',
vid: '000001',
poster: 'http://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/xgplayer_doc_video/music/poster-small.jpeg'
},
{
src: 'https://fs.zhx.su/d/fs/share/SamoyedPlayer/yourname.mp3',
title: '前前前世',
vid: '000002',
poster: 'https://fs.zhx.su/d/fs/share/SamoyedPlayer/yourname.jpg'
}],
},
width: "100%",
height: 70
})
})```