1.1.4 • Published 3 years ago

@vuepress-reco/vuepress-plugin-bgm-player v1.1.4

Weekly downloads
27
License
MIT
Repository
github
Last release
3 years ago

@vuepress-reco/vuepress-plugin-bgm-player

demo.png

Details

Bgm player plugin for vuepress-theme-reco or other vuepress theme.
Vuepress 音乐播放器插件

使用位置
plugin name@vuepress-reco/vuepress-plugin-bgm-player
component nameBgMusic(自动出现在页面中,无需添加额外代码)

Options

以下为插件注入时的参数。

Attributes

参数说明类型默认值可选值
audios播放列表Array-
position播放器位置Object{ left: '10px', bottom: '10px', 'z-index': '999999'}-
autoplay是否自动播放Booleanfalsetrue/false
autoShrink是否自动缩小Booleanfalsetrue/false
shrinkMode指定PC端缩小为哪种模式String'float''mini'/'float'
floatPosition指定浮窗模式浮动在哪一侧String'left''left'/'right'
floatStyle浮窗的样式Object{ bottom: '200px', 'z-index': '999999' }-

audios示例

  • audios为播放列表的对象数组
  • 无默认值必须配置
  • 示例
    audios: [
      // 本地文件示例
      {
        name: '장가갈 수 있을까',
        artist: '咖啡少年',
        url: '/bgm/1.mp3',
        cover: '/bgm/1.jpg'
      },
      // 网络文件示例
      {
        name: '강남역 4번 출구',
        artist: 'Plastic / Fallin` Dild',
        url: 'https://assets.smallsunnyfox.com/music/2.mp3',
        cover: 'https://assets.smallsunnyfox.com/music/2.jpg'
      },
      {
        name: '用胳膊当枕头',
        artist: '최낙타',
        url: 'https://assets.smallsunnyfox.com/music/3.mp3',
        cover: 'https://assets.smallsunnyfox.com/music/3.jpg'
      }
    ]  

shrinkMode说明

  • PC端可以通过shrinkMode来指定正常模式缩小时缩小为哪种模式
  • 移动端默认缩小为浮窗模式

About

  • 兼容性:vuepress-plugin-bgm-player是使用HTML5的Audio开发,故兼容性与Audio的兼容性相关
  • 对于 vuepress-theme-recodark 模式的适配
    dark.png
  • 开发计划
    • 移动端适配问题修复
1.1.4

3 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago