bytedance / xgplayer

A HTML5 video player with a parser that saves traffic
https://h5player.bytedance.com/
MIT License
8.17k stars 858 forks source link

官网的音乐播放器demo实现之后为什么是视频播放器的样式? #1357

Closed bruce-zhang932 closed 3 days ago

bruce-zhang932 commented 5 months ago

您使用的西瓜播放器版本是多少? What version of xgplayer are you using? v3.0.14

您使用的操作系统和浏览器分别是? What OS and browser are you using? h5端

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" }, 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' }], }, }) })`

image 官网的音乐播放器demo实现之后为什么是视频播放器的样式?不是这种样式呢? image

lytdev commented 4 months ago

我也是,按照官方文档,设置出来的就是视频的播放效果

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] commented 3 days ago

This issue has been automatically closed after a period of inactivity. If it is still present in the latest release, please create a new issue with up-to-date information. Thank you!